Form on open shows 2 records exist when recordset not open

  • Thread starter Thread starter kfguardian
  • Start date Start date
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.
 
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.
 
I don't use this command. I just click on it from the list (eventually it
will open automatically when access starts).
 
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.
 
Back
Top