Please tell me what is wrong

ysfpsu

Registered User.
Local time
Today, 07:02
Joined
Aug 2, 2005
Messages
17
I'm trying to mess with a combo box where when one user selects a value a form opens up. This is the code I'm typing in but I keep getting a syntax error

DoCmd.OpenForm(Phone,[View As AcFormView=acNormal],[DataMode As AcFormOpenDataMode=acFormAdd],[WindowMode As AcWindowMode = acWindowNormal],[OpenArgs])
 
ysfpsu said:
I'm trying to mess with a combo box where when one user selects a value a form opens up. This is the code I'm typing in but I keep getting a syntax error

DoCmd.OpenForm(Phone,[View As AcFormView=acNormal],[DataMode As AcFormOpenDataMode=acFormAdd],[WindowMode As AcWindowMode = acWindowNormal],[OpenArgs])

DoCmd.OpenForm Me!cboForm, acNormal, acFormAdd, acWindowNormal

This assumes that the form name is the bound column of your combobox.
 
So should I just get rid of what I wrote and copy and paste what you wrote?
 
My form name is Phone...I want it so that when the user selects ISP from the combo box it opens up the Phone form. I pasted ur code and nothing happened.
 
What happens if they select something else from your combobox? what is the rowsource of your combo? Is that command in the After Update event of the combo? Is that the only code there?
 

Users who are viewing this thread

Back
Top Bottom