Re: Making use of a Passed Argument
- From: Duncan Bachen <dbachen@olehansen_dot_com>
- Date: Wed, 10 May 2006 12:41:18 -0400
Roger Carlson wrote:
If ServiceN is a field or variable, then list it without the quotes:
DoCmd.OpenForm "frmStaff_Entry", , , "Name = " & Chr(34) & Me.Namex &
Chr(34), , , ServiceN
Right now, you are passing it the literal string "ServiceN". Without the
quotes, it will pass the value of the variable.
Just as a followup, 'Name' is a reserved word in Access. You shouldn't name (no pun intended) any of your fields or any other object with a reserved word. Sometimes it'll work, sometimes it won't. It really depends on what the code is trying to do.
That's probably not the problem here, but you should make the correction for the future anyway.
Here's a list of all the reserved words: http://support.microsoft.com/kb/q286335/
--
-D
Duncan Bachen
Director of I.T., Ole Hansen and Sons, Inc.
.
- References:
- Re: Making use of a Passed Argument
- From: Roger Carlson
- Re: Making use of a Passed Argument
- Prev by Date: Re: Close run-time 2450 error message
- Next by Date: Re: Write to table
- Previous by thread: Re: Making use of a Passed Argument
- Next by thread: Re: Adding date automatically
- Index(es):
Relevant Pages
|