Bills problem run time error

B

Bill_De

I Have a data base form that is tabbed to have several sub forms. I created
the first form Contacts and then created a form called "frmRegistration". In
the registration form I have a combo box that I can select a building and
room number and then a query updates the table and removes the Check box
which is the availability or not.

Here is my problem I draged the frmRegistration over to the tab in the frm
contacts to make a sub form in tab 2. The frmContacts is in tab 1. If I fill
in all of the information in the registration form except a building and room
then click save the form saves the information and closes with no problem. If
however I enter the information and then click on the combo box named Combo54
then click save I get the following error:

Run time Error 2450
Microsoft Access can't find the Form 'frmregistration' referred to in a
Macro Expression or Visual Basic Code.

I then click on the debug button and the VB editor opens to my Combo54 code:

Private Sub Combo54_Exit (Cancel as Integer)
Dim db as DAO.Database
Dim qdf as QeuryDEF
Set qdf=db.Query Defs("Reserve Room")
{Yellow Highlight} qdf.Parameters(0). Value= Eval(qdf.Parameters(0).Name)
qdf.Execute dbFail on Error
Me.Combo54 Requery

When I put the cursor on the qdf.Parameters(0).Value I get the following
experssion: qdf.Parameters(0).Value=empty
When I put the cursor on the qdf.Parameters(0).Name I get the following
expression: qdf.Parameters(0).Name="[Forms]![frmRegistration]![Combo54]"

Any advise you can give me would be great. The forms worked perfect until I
draged the registration form over to the second tab and made it a sub form of
the Contacts form.

Thanks
Bill
 

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