Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FindRecord not finding the Record as the fetch is not complete

Status
Not open for further replies.

seenoorao

Programmer
Sep 6, 2005
8
US
Hi,

I am facing with a particular problem while trying to find a record in an Access 2K ADP form.

Requirement:
----------------
I have a first form (Say Form1) from where I am passing a RecID to another form (Say Form2). Form2 is databound to Table1 - RecID is a foreign key field for the Table1. I am passing this value using OpenArgs.

In the open method of Form2 I am setting the focus to the RecID field first and then using DoCmd.FindRecord() to find the record with the RecID which was initially passed to Form2.

My requirement is that whenever I pass a RecID from Form1 to Form2, Form2 should automatically navigate to that RecID record. (i.e. I cannot use a Where or a Filter to achieve this - I need to see all the records, but the first record that I see should be the one I passed from Form1)

Behaviour & Observations:
--------------------------
When Form2 opens up, it appears like only a small set of data is fetched first. Say in my case, I had 400 records in the table but the navigation bar shows only 100 records initially (after some time it shows 400 records).

Now for the problem behaviour - I have observed that if the record I am searching for comes within the first fetched records then the FindRecord works fine. Else this method points me to the first record on the form and the find is not working.

Questions:
-----------------

1) If any of you have faced a similar scenario, could you please let me know whether my observation is correct?

2) Also if it is correct, how do I make sure that the FindRecord executes correctly irrespective of the number of records that are fetched initially by Form2?

Thanks and Regards,
Shrini.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top