"The OpenForm action was canceled"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to get to one form from another in an Access database but keep
getting the message above. Can anyone please help me understand why? I'm
using Access 2003
 
The error message says that something prevented ACCESS from opening the form
that you're calling. Could be any number of reasons, based on your setup.
Tell us more about what you're doing.
 
Hi Ken,

Basically I'm trying to get a command button to open a form based on a value
given to it as a result of user input. e.g. member id = '7', command button
should open new form showing details of record with this member id. Would be
very appreciative if you could help. I know it's only something small that's
causing the problem.
 
Assuming that the user is typing or selecting the value in a control on the
form that then will run the code to open the second form, use the Where
argument of the DoCmd.OpenForm method:

DoCmd.OpenForm "FormName", , , "[Member ID]=" & Me.ControlName.Value

where ControlName is the name of the control that is used by the user to
enter/select the value.
 
Back
Top