Assign unique PO# to a new record in a form

  • Thread starter Thread starter bauer6
  • Start date Start date
B

bauer6

I have created a new table to include numbers from access that increase
by one in each cell below the starting value, called it number with one
field and made it a primary key.

I created a left outer join query to show all record in Number table
matching records in PO table and selected the PO# field from PO and
gave it the criteria "is null".

Then I went into the form properties and on the BeforeInsert event
button I asked it to do the following:

Dlookup ([Number qry]![PO #])

What am I doing wrong, the PO number when I click the Add New Record
button shows 0
 
dLookup("fieldname","Tablename")

--> dLookup("[PO #]","[Number qry]")

but dLookup will some record for that criteria, wouldn't you want dMin?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top