PDA

View Full Version : Opening a form based on contents of another form



philfer
03-06-2010, 07:45 AM
Hello,

I have a database with a continuous form which lists people. I have a button on each saying "add" which when clicked will opens another form (the original form isnt closed yet) where the user can add a few more details and add a person to the database.

On the form which opens when you click "add" I have the following type of code to the Form_Load event

Me.ClientID = Forms!frmClientList.txtIDNumber

but I get an error saying something about an object problem. I have changed it to :-

Me.ClientID = Forms!frmClientList!txtIDNumber

but get the same problem.

Where am I going wrong

Thanks
Phil

CreganTur
03-08-2010, 08:12 AM
Can you post the exact error message? Want to make sure the right problem is being diagnosed.

Imdabaum
03-17-2010, 03:42 PM
When you open this form is it opening to a person that gets additional information added to them? Or are you opening a blank form to add a person with respectively new information?

Do you have values for txtIDNumber if you Debug it? Might be opening to add a new one and attempting to find the txtIDNumber you are passing it.

just a hunch, if it doesn't work then stick to Cregan's adivce and see if you can get a more detailed error message.