473,513 Members | 2,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect End of Recordset in Subform

I have Access 97 and a database which fills in new values in a
****subform***. It plucks the values from the main form and plugs them into
EXISTING RECORDS in the subform. What I need for it to do is to loop and
keep doing this until it reaches the last recordset of the subform.

The code I have so far looks like this:

' Searches for the 1st entry whose date matches the current date
DoCmd.FindRecord Date, acEntire, False, , False, , True
For n = 1 To 3
Me.sfrSchedule![qty] = Me.txtPartsShift
Me.sfrSchedule![partid] = Me.part_currently_run
DoCmd.GoToRecord , , acNext
Next n

Obviously the n=1 to 3 makes it do it for the 1st 3 lines. The pattern of
the records in the subform is that there are ALWAYS 3 lines for each date.

Instead, what I need it to do is start from where it found the date match
and keep going until it reaches the last record (regardless of the date),
then STOP. Don't keep adding new records.

Tips?

LRH
Nov 12 '05 #1
1 3459
rkc

"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:Od5tb.1263$6G3.262@fed1read06...
I have Access 97 and a database which fills in new values in a
****subform***. It plucks the values from the main form and plugs them into EXISTING RECORDS in the subform. What I need for it to do is to loop and
keep doing this until it reaches the last recordset of the subform.

The code I have so far looks like this:

' Searches for the 1st entry whose date matches the current date
DoCmd.FindRecord Date, acEntire, False, , False, , True
Perhaps:

dim i as integer
dim j as integer

i = Me.sfrSchedule.Form.CurrentRecord
j = Me.sfrSchedule.Form.RecordsetClone.RecordCount

For n = i To j Me.sfrSchedule![qty] = Me.txtPartsShift
Me.sfrSchedule![partid] = Me.part_currently_run
DoCmd.GoToRecord , , acNext
Next n



Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3898
by: Bruno Luis | last post by:
Hello I'm using A97 and i'm having some trouble with creating a recordset with data from two different databases. I connect to a remote database and make this data the default source for my...
3
8337
by: Tlm | last post by:
Hello All, I have a form (FrmA) with a subform (SubFrmB) embedded in it. SubFrmB also has a subform embedded in it (SubFrmC) The form's recordsource is based on a table (TblA). SubFrmB's...
11
11511
by: Ian Ornstein | last post by:
in posting http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&newwindow=1&selm=bmEK9.43452%24lj.1060600%40read1.cgocable.net Lyle showed us that an ADODB.Recordset can be created and attached to a...
0
2341
by: CSDunn | last post by:
Hello, In Access ADP's that connect to SQL Server databases, any time I have a situation where I have a combo box in a main form that looks up a record in a subform, the subform record source has...
25
10169
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
3
2770
by: shumaker | last post by:
This code from the subform works for getting the value of a field of the main form named "WorkSheet": MsgBox Form_WorkSheet.Recordset.Fields("Clerk").Value Each record in the mainform datasheet...
0
1632
by: sneal | last post by:
A little background: We have an Access 2002 based user interface to our SQL Server 2000 database. The interface is a tabbed form with two of the tabs containing a subform. Data is pulled from the...
2
1725
by: Welie | last post by:
I apologize if this is a faq. I searched for about 45 minutes and didn't find a good answer but there are many matching posts. I have a form which is based on a simple query to a linked table....
7
5623
by: tnjarrett | last post by:
Hello, I have a MS Access continuous subform that was using a query as the recordsource. I changed it to use a recordset instead because when the query was used, the changes to the subform values...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.