HELP:Debug on module

  • Thread starter Thread starter stephani
  • Start date Start date
S

stephani

Dear group member,
I am a beginning to write my own VBA modul in Access2000.
I have a form called UA_test.
and have another form called GoToRecordDialog which has a
List box to show info based on form UA_test.
I used a button to change record in UA_test form.
my code:
Private Sub ShowRecord_Click()

Dim rst As DAO.Recordset

Set rst = Forms!UA_test.RecordsetClone

rst.FindFirst "UA_id =" & List0


Forms!UA_test.Bookmark = rst.Bookmark

DoCmd.Close acForm, "GotoRecordDialog"

End Sub
but i got erro message:"Run-time error2450
Mircosoft Access can't find form UA_test referred to macro
expression or visual bassic code."

please help me!
thank you very much!
stephani
 
stephani said:
I have a form called UA_test.
and have another form called GoToRecordDialog which has a
List box to show info based on form UA_test.
I used a button to change record in UA_test form.
my code:
Private Sub ShowRecord_Click()

Dim rst As DAO.Recordset

Set rst = Forms!UA_test.RecordsetClone

rst.FindFirst "UA_id =" & List0


Forms!UA_test.Bookmark = rst.Bookmark

DoCmd.Close acForm, "GotoRecordDialog"

End Sub
but i got erro message:"Run-time error2450
Mircosoft Access can't find form UA_test referred to macro
expression or visual bassic code."

stephani,

is the form UA_test opened in form view when you run the above code?
The Forms collection contains at any given time only opened forms.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top