Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open form with where condition from a variable

Status
Not open for further replies.

Lightlancer

Programmer
Jul 18, 2008
88
NL
Hi,

I want to open a form with a macro, in that form there is a field named: "NaamMedewerker"

Stored in a variable "gstrDezeMedewerker"

now the form must open on the right record, so the where condition must be something like

NaamMedewerker = gstrDezeMedewerker

i Tried this:

="NaamMedewerker=" & ( & gstrDezeMedewerker & )

but that isnt right

any ideas?
 
gday light,

i think this is pretty well documented in the help file? i dont use macros but i think your example should be

Code:
="NaamMedewerker= '" & gstrDezeMedewerker & "'")

if both are strings, or

Code:
="NaamMedewerker= " & gstrDezeMedewerker)

if number.

Don't forget the cstr, val or cint/clng etc functions if you're using a mix

JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top