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!

Recordset Problem

Status
Not open for further replies.

krispi

MIS
May 16, 2002
281
GB
This is similar to a post I made yesterday but I have narrowed the problem down...

When I open a form, I cannot navigate through the records. The navigation buttons do not work. (They should). It is as if Access is seeing an empty recordset.

If I tell the open form to go to the last record it remains stubbornly on record 1.

I can, however, add new records.

The form is based on a query. In an attempt to isolate the problem, I added a test button to the form with the code

MsgBox(me.recordsetclone.recordcount)

The messagebox returns the correct number of records. Once I press OK to close the messagebox, the navigation buttons miraculously start working - it's as if the form has needed a kick start to recognise the recordset.

Does anybody know why this might be happening?
 
Check to see if the following flags are set in the Form Properties under the Data tab:

Filter: <blank>
Order By: <blank>
<...for the previous two, I figure you're basing your form off of a Query in Record Source...>
Allow Filters: Yes
Allow Edits: Yes
Allow Deletions: Yes
Allow Additions: Yes
Data Entry: No

Then check to see if the following is set for the Other tab under the same Form Properties:

Cycle: All Records

I believe these are the primary issues.

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

&quot;No need to send gifts, just send a smile.&quot;
 
Thanks for replying Roy - but all my settings are as you describe, and the problem still persists (and you're right about the RecordSource being a query...

This is doing my brain in!!!

Chris
 
Hi Chris.

Well, ok, let's try this. Seeings how you had checked the DoCmd line to see if it's opening the form appropriately, my last and final suggestion would be to check your

Form!OnCurrent
Form!OnOpen
Form!OnLoad
Form!Activate (hardly used)
Form!GotFocus (rarely used)

and maybe other Event Procedures that look like they're out of the ordinary (I know, kind of hard to say when you're constantly looking at the stuff). Also, did this JUST happen with an existing form or has it happened because it's a new form?

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

&quot;No need to send gifts, just send a smile.&quot;
 
All I've got is DoCmd.Maximise in Form!GotFocus.(and a little validation in BeforeUpdate)

I believe, after reviewing earlier versions of my db that the problem has been there since I created the form, it hasn't just started happening.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top