Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Location
    New York, NY
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trouble getting "DMax" to work (Access 2000)

    I'm trying to get the following line of code to work. It is SUPPOSED TO get the next available job number (or use the job number 1) but thing seems doesn't seem to generate any numbers larger than 10.

    Here's the line of code.

    NewJobNo = Nz(DMax("[LogJobNo]", "tblDayWPDocLog", "LogDate=#" & _
    Format(NewDate, "mm/dd/yyyy") & "#"), 0) + 1

    Does anyone have any idea what the problem might be?

    Thanks,
    Steve

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Trouble getting "DMax" to work (Access 2000)

    You do realize that you're asking for the maximum LogJobNo on a particular date, and not the maximum number overall, right? And what datatypes are LogJobNo and NewDate?
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •