using "where" to open form

  • Thread starter Thread starter DavidW
  • Start date Start date
D

DavidW

if you had a table "info" and a field "customers"
and you wanted to open a form "location"
in single form view from an existing form and match records ,how would you
do that.
I found where you can go to a report, and I tried to modify that but, my
syntax is not correct

Dim strWhere As String
If Me.Dirty Then 'Save first.
Me.Dirty = False
End If
strWhere = "[customer]"
End If
DoCmd.OpenForm "location", acNormal, , strWhere

Thanks
David
 
WHERE syntax:
WHERE FieldA = ValueA, FiledB = ValueB ...

strWhere = "[customer] = " & Me.Customer.Value
DoCmd.OpenForm "location", acNormal, ,
 
I tried
If Me.Dirty Then 'Save first.
Me.Dirty = False
End If
strWhere = "[customer] = " & Me.customer.Value

End If
DoCmd.OpenForm "location", acNormal, , strWhere
and I am still getting an error
any ideals?
 
Back
Top