By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

Fetching an autonumber on a form.

Missionary
P: 30
I have two tables. Basically there is one [tblReq] that has location [Tag], project [Service] and an autonumber [ID] The other table [tblLog] stores a cheklist record for every time that project gets inspected. It has a number field that is linked to the Autonumber from tblReq and the date and some other things.
Now in my Log form, I want to be able to look up the Tag and the Service in combo boxes and have the form automatically input the ID into the number field in tblLog.

What I've got so far:
I first made a query with all the values and a form that showed them, but instead of bringing up the ID, it just created a new record in tblReq with a new Autonumber.

Then I tried makeing a subform, but I can't figure it out.
This seems like something people would do alot, but I couldn't find anything on the forums. I probably just don't know where to look.

Thank you.
Aug 29 '08 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,419
I'm sure we can find a solution, but could you lay out the tables for me so I can think the problem through more clearly.

This will work better if you can post the meta-data (info about the layout / structure) of the table in the same way as I use in my example. Click on the Reply button and you will have access to all the codes I've used. PK & FK stand for Primary Key & Foreign Key respectively.
Table Name=[tblStudent]
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Aug 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.