A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

code a range of records?



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2004, 02:43 PM
TreDogg103
external usenet poster
 
Posts: n/a
Default code a range of records?

I have a table that contains "header and footer" type records... that is...
the first record in the table is a record that displays "BEGIN BATCH" and
various info about all following records up to the "END BATCH" record. In
other words, there are "batches" of records denoted by beginning and ending
records at each end of the record range. I need to take the value of a field
in the "BEGIN" record and assign that value to all records between the
"BEGIN" record and the "END" record. There are multiple "batches" in the
table that each need to have this value assigned from their respective
"BEGIN" record. I do not control the format of this table as it is created
by a third party program. I've tried using DLookUp but it doesn't "loop"
like I want it to... it basically shifts all values in that field down one
record, rather than assigning to all records in the record range. If anyone
can help, I would appreciate it. Here is a basic example of the table:

BEGIN BATCH X7645 34006 DK430 32
4098903-099 390H4 093KJS 4390U L490U4 40934
4045903-023 3DGH4 4H3K2S 4690U LE5FU4 S9SE
END BATCH O43OI 3490U 4LHJ90 LK

I would need the "32" from the "BEGIN" record assigned to a field in the two
records betweeen the "BEGIN" and "END" record.
--
Tre
  #2  
Old October 26th, 2004, 05:51 PM
[MVP] S.Clark
external usenet poster
 
Posts: n/a
Default

From the data sample, there doesn't appear to be any similar code that
denotes which BEGIN goes with which END. This could make things rather
difficult.

Regardless, I would solve using VBA code to locate each BEGIN, and walk
through or query the update, until each END

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

"TreDogg103" TreDogg103 (at) hotmail (dot) com.(nospam) wrote in message
...
I have a table that contains "header and footer" type records... that

is...
the first record in the table is a record that displays "BEGIN BATCH" and
various info about all following records up to the "END BATCH" record. In
other words, there are "batches" of records denoted by beginning and

ending
records at each end of the record range. I need to take the value of a

field
in the "BEGIN" record and assign that value to all records between the
"BEGIN" record and the "END" record. There are multiple "batches" in the
table that each need to have this value assigned from their respective
"BEGIN" record. I do not control the format of this table as it is

created
by a third party program. I've tried using DLookUp but it doesn't "loop"
like I want it to... it basically shifts all values in that field down one
record, rather than assigning to all records in the record range. If

anyone
can help, I would appreciate it. Here is a basic example of the table:

BEGIN BATCH X7645 34006 DK430 32
4098903-099 390H4 093KJS 4390U L490U4 40934
4045903-023 3DGH4 4H3K2S 4690U LE5FU4 S9SE
END BATCH O43OI 3490U 4LHJ90 LK

I would need the "32" from the "BEGIN" record assigned to a field in the

two
records betweeen the "BEGIN" and "END" record.
--
Tre



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Records from one table to another on different databases Mike Smith Running & Setting Up Queries 3 November 3rd, 2004 07:02 PM
count records based on date range SFatz Running & Setting Up Queries 4 October 8th, 2004 08:24 PM
Filter Records Code Needed Dave Elliott Using Forms 1 October 5th, 2004 04:39 AM
Removing a form and all of the module code for it Jack Gillis General Discussion 4 July 25th, 2004 07:07 PM
Hide or show Control Button on Form in Access 97 Pete Sperling Using Forms 8 July 13th, 2004 04:13 PM


All times are GMT +1. The time now is 02:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.