keyongtech


  keyongtech > access.* > access.modulesdaovba > 06/2006

 #1  
06-03-06, 01:46 PM
Tim Jones
Hope everyone is well, I have been trying to create a flat file that can be
saved as a fixed length file. This file is required to transmet claims over
an edi connection.
Challenges
Take one table and loop through it for each claim nymber
with each claim number find records in the parts table
loop through the parts table and append or update three fields on the end of
the claim table.

the loop would look something like this

dim recordset one
dim recordset two

do until eof recordset one
var =recordset one!claim number
do until eof recordset two
if recordset two!claim number = recrodset
one!claim number
recordsetone!part1 =
recordsettwo!part
recordsetone!part1price =
recordsettwo!price
elae
recordsettwo,movenext
loop
recordsetone.movenext
loop
end

Here is the problem. For some reason I cannot get the variables to match
between the two recordsets. I have tried several approaches, find first
makeing recordset two based only on the criteria of recordsetone!claim
and I just keep falling short.
Does anyone know of a good example or article on this so I could research it
 #2  
06-03-06, 02:00 PM
Alex Dybenko
Hi,
I think you have to add:
recordset two.movefirst

before:
do until eof recordset two

Also - it looks like you can do the same ting very easy with update query
(if recordset 2 source SQL is updatable)

Alex

"Tim Jones" <Tim Jones> wrote in message
news:27a5
[..]
Similar Threads
Creating multiple records from a single record

Hi, Gang, I'm a bit perplexed with how I can perform this task. I have a set of data that is arranged such as this: Function e_p_date1 e_p_date2 ...

NEED A SINGLE RECORD RETURNED FROM ONE TO MANY QUERY

I am having a mental block as to how to return just 1 instance of records from the INVESTIGATOR table. Each investigator may have many projects, that is captured in a...

creating a flat file (txt or excel) based on a query with one to many records

I am attempting to create a flat file that I need to send to a service processor. Problem The file I am creating comes from a query with a one to many join. This results in...

Creating a single record from multiple records with a unique key

I am trying to change a vertical list of records with a unique key to a single horizontal record. See this example: Current Query output KEY Index Type ...

Update Query on Single Record

How do i run an update query from a form to only affect that single record?? Same for an append query?? I am using Access 2002. Any help would be great!! -Michael


All times are GMT. The time now is 09:52 PM. | Privacy Policy