Combo Box and Forms

  • Thread starter Thread starter Calvin
  • Start date Start date
C

Calvin

Good morning!
I have a combo box on a form. The information in the
combo box comes from the names of projects that have been
imputed through forms. I want the user to select one of
the projects on the combo box then hit a command button
that will take them to that particular form. I am using
access 2000 and I'm having trouble accessing the exact
form that has been chosen in the combo box. Its only
going to a "new" form, as if I was adding a new project.
What do you think? Calvin
 
You need to set the filter property in the new form to
read value from the combo on the select form.
 
Calvin said:
I have a combo box on a form. The information in the
combo box comes from the names of projects that have been
imputed through forms. I want the user to select one of
the projects on the combo box then hit a command button
that will take them to that particular form. I am using
access 2000 and I'm having trouble accessing the exact
form that has been chosen in the combo box. Its only
going to a "new" form, as if I was adding a new project.


How are you trying to open the form?

Generally, the code behind the command button should use the
OpenForm method's WhereCondition argument (see Help).

strDoc = "nameofform"
'strWhere = "keyfield = " & Me.thecombo 'number
strWhere = "keyfield = """ & Me.thecombo & """" 'text
DoCmd.OpenForm strDoc, WhereCondition:= strWhere
 
Back
Top