Find Record Question

C

Chris

I added a command button and let the wizard create a Find
Record Event for my form which is attached to a table. I
keep receiving this error when I try to use it.

"You can't use find or replace now.

The fields are not searchable due to one of the following
reasons.

-The fields are controls (such as buttons or OLE objects)
-The fields have no data
-There are no fields to search.

None of this is true.

Here is the code I am opening the form up with

Private Sub Command1_Click()
DoCmd.OpenForm "frmMain", acNormal, , , acFormAdd
DoCmd.Close acForm, "frmFirst"

[Forms]![frmMain]![Date_Received].SetFocus

[Forms]![frmMain]![Command48].Visible = False

End Sub

I even tried to open the form in normal view and still get
this message.

Any help is appreciated.
 
B

Bill Taylor

Hi Chris,
From what I can see here the form's command button will do nothing based on
the way the form is opened. It has no records to search thru because it
opened in add mode, showing no existing records. You would essentially be
searching a null recordset.
HTH
 
C

Chris

I also tried opening it in normal view and still nothing.
I am using Access 97

-Chris

-----Original Message-----
Hi Chris,
From what I can see here the form's command button will do nothing based on
the way the form is opened. It has no records to search thru because it
opened in add mode, showing no existing records. You would essentially be
searching a null recordset.
HTH
I added a command button and let the wizard create a Find
Record Event for my form which is attached to a table. I
keep receiving this error when I try to use it.

"You can't use find or replace now.

The fields are not searchable due to one of the following
reasons.

-The fields are controls (such as buttons or OLE objects)
-The fields have no data
-There are no fields to search.

None of this is true.

Here is the code I am opening the form up with

Private Sub Command1_Click()
DoCmd.OpenForm "frmMain", acNormal, , , acFormAdd
DoCmd.Close acForm, "frmFirst"

[Forms]![frmMain]![Date_Received].SetFocus

[Forms]![frmMain]![Command48].Visible = False

End Sub

I even tried to open the form in normal view and still get
this message.

Any help is appreciated.


.
 

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