Form on open shows 2 records exist when recordset not open

K

kfguardian

How do I clear the form when opening so that it just shows the blank form and
1 of 1 records? I use ADO to query and populate the form after clicking a
button so I don't know why the record bar is showing that 2 records exist
(which are both empty) when nothing has been done yet.
 
S

Stuart McCall

kfguardian said:
How do I clear the form when opening so that it just shows the blank form
and
1 of 1 records? I use ADO to query and populate the form after clicking a
button so I don't know why the record bar is showing that 2 records exist
(which are both empty) when nothing has been done yet.

Use the WhereCondition argument to the OpenForm command, like this:

True = False

That condition can never be True, so the form will open blank.
 
K

kfguardian

I don't use this command. I just click on it from the list (eventually it
will open automatically when access starts).
 
K

kfguardian

I discovered I had saved the form with the last query populating the form
record source so it was querying upon opening. It just couldn't display the
data because the recordset wasn't open.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top