|
-
Jan 17th, 2005, 04:22 AM
#1
Thread Starter
New Member
RecordsetClone
From one form I am trying to open a different form based on a select date in a recordset. When I do this, it filters out only those records that have that date. I do not want this. I want to somehow create a RecordsetClone so after the new form opens, it will open to the first record with the selected date but then I can still be able to scroll forward or backwards through the records to see other records with different dates. I just can’t seem to get any code to work.
Specifically My code on the primary form is-
DoCmd.OpenForm "FlightList", acNormal, , "FltDate=#" & ([M3]) & "/" & ([MONTH]) & "/" & ([YEAR]) & "#", acFormReadOnly, acWindowNormal
‘Where [M3] is a number that represents a specific calendar day
‘[MONTH] and [YEAR] is the current month and year displayed on the primary form
For example: If [M3] = 12 and [MONTH] = January and [YEAR] = 2005 the result of my code is this –
DoCmd.OpenForm "FlightList", acNormal, , "FltDate= 12/January/2005#", acFormReadOnly, acWindowNormal
The result from executing this code on the primary form returns all records on the target form with a date of 12/January/2005. But now I can not navigate to any other date because the previous code creates a “filter” of the records. If I use additional code to remove the filter, the recordset on the target form reverts to the first record in the recordset. I would like to open the target form to display the current record as 12/January/2005. With the OnClick property assigned to a couple of command buttons, I would like be able to then navigate to the first record with a date prior to or just after the current record.
Last edited by rick.chagnon; Jan 17th, 2005 at 04:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|