Re: Dlookup and update not working correctly



Rick,

It seems to be working, thanks so much for all your help. Do you have any
resources you would recommend for figuring out this kind of syntax?

Thanks again,

Justin

Rick Brandt wrote:
I made some changes and am not using the Combobox anymore. Code
looks like:
[quoted text clipped - 3 lines]
Where RepNum is an int and Salesperson is a number field. todaysdate
is formatted like mm/dd/yyyy.

The way you've written that it ois going to assume tha RepNum is a field in
the Report's query. You need to put the variable outside the quotes. Also,
the word "And" needs to be inside the quotes.

stLinkCriteria = "[Salesperson] = " & RepNum & " And [todaysdate] = date"

Now... what is "date" above and what is "[todaysdate]"? If you mean the VBA
function Date() then that will always be equal to "todays date". If
"[todaysdate]" contains what its name implies then that would seem to be an
unnecessary thing to have in there.

If you are using "date" for anything else then change that. It is a
reserved word and will be confused with the VBA function.


--
Message posted via http://www.accessmonster.com

.



Relevant Pages

  • Re: Dlookup and update not working correctly
    ... Where RepNum is an int and Salesperson is a number field. ... You need to put the variable outside the quotes. ... reserved word and will be confused with the VBA function. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Functions with Dlookup?
    ... Is VanID a text ... you need quotes around the value). ... BTW, Date is a bad choice for a field name: it's a reserved word, and using ...
    (microsoft.public.access.gettingstarted)
  • Re: Making use of a Passed Argument
    ... you are passing it the literal string "ServiceN". ... quotes, it will pass the value of the variable. ... You shouldn't name any of your fields or any other object with a reserved word. ...
    (microsoft.public.access.formscoding)
  • Re: Date format to display month name
    ... just put full quotes around the ... (a Reserved word) ... except in your labels and captions ...
    (microsoft.public.access.queries)
  • Re: Is "From" a legal col name.
    ... This is not really a java question, but java is my platform so I'm ... Is "From" a legal column name? ... if you use a reserved word as an identifier you have to quote it with double quotes: ... Note that most DBMS are case-sensitiv when using double quotes, so maybe in your case it should read: ...
    (comp.lang.java.databases)