sample tracking

P

Plynlimon

Hi
I hope someone in here can help me.
I need to create unique ID's for vegetation samples that I will be collecting.
The Add_Samples form will ask for the number of plots (numeric) and number
of sub-plots (alpha numeric) eg

Number of plots? 15
Number of sub-plots? 3
Alpha/numeric? alpha

I would then like to be able to write these to a Sample_ID table with a set
of sub-plots entered for each plot and have a unique ID generated for each
sample in the form of the following

Sample ID
plot 1 a 100001
plot 1 b 100002
plot 1 c 100003
plot 2 a 100004
plot 2 b 100005
etc.

Many thanks in advance
dave
 
W

Warrio

top get the last id inserted
use a simple select

set a recordset to select (ask me if you don't know hot to..)
SELECT Max(ID) AS LastID FROM yourTable

your new ID is then equal to : rs.fields("ID")


Is that what you wanted to know?
 

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

Top