Assign unique PO# to a new record in a form

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
 
S

strive4peace

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
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sharing PO number on network 3
Subform causing duplicate records? 7
changing text to numeric 6
Adding an item number 1
Combo box macro doesn't work 3
PO# DMax 5
DLOOKUP 2
Form update tables 3

Top