HELP:Debug on module

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
 
E

Emilia Maxim

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
 

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

Similar Threads

Recordset Clone 6
Go to same Record/ Syntax Error 8
Error 3070 3
Control Source problem? 3
Data Member not Found 3
Mimic Split Form with Two Subforms 0
bookmark in subform 2
RecordsetClone not workin 2

Top