Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form and VBA 1

Status
Not open for further replies.

Superguppie

Technical User
Jan 19, 2005
107
NL
hi all,

i have 2 tables, tblStoring and tblOplossing. also i have 1 form, frmStoringaanmelden.

in that form the ticketnummer automaticly fills in with autonumber, but that number must also be in tblOplossing, i thought this is done with a simple VBA code but im not sure, so the field Ticketnummer from frmStoringAanmelden must also filled in, in Table tblOplossing.
is there a simple VBA code for, or maybe a other way?

Greetz

Superguppie
 
Just guessing on your table structure, and also guessing that the recordsource for frmStoringaanmelden is tblStoring.

I assume that you want related records in both tables.
So in tblOplossing there should be a field called StoringID that is an integer.
Create a form based on table tblOplossing.
Plop it onto your other form; now it's called a "subform".
Use the Master and Child links to form a relationship between them. Then, when you begin typing info into the subform (tblOplossing), the number will automatically fill in.

Look up "subforms" and "Master/Child links".

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Thats an option allright, but the tblOplossing form cannot be on the same form as tblStoring, well maybe i can hide the all fields of tblStoring, so that isnt visible, (the problem is im making an DB for stupid people :D, they cannot and may not see everything so thats the point.....) i will give it a try, you will hear from me:D

Greetz
Superguppie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top