autopopulate fk

  • Thread starter Thread starter short
  • Start date Start date
S

short

I have a form that has tabs to view different information, the information
viewed is all tables, that I've made so the user can not edit any information
from those tables w/out clicking add new. So I create another form, that
opens when the add new is clicked. I want to know how to autopopulate the fk
for the linked tables in the smaller forms.
for example:
tblserver
id-pk

tbldiskdrive
id-pk
serverid-fk

do I link the forms by the Before Insert event, and how would that look.
 
That's not what I need. If I did a subform, it would make my form very
confusing for the users.
 
Okay. Another idea is to use the OpenArgs parameter of the OpenForm method
to send the value of your primary key to the new form. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"OpenArgs.mdb" which illustrates how to do this. You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=307

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Thanks.

Roger Carlson said:
Okay. Another idea is to use the OpenArgs parameter of the OpenForm method
to send the value of your primary key to the new form. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"OpenArgs.mdb" which illustrates how to do this. You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=307

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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

Back
Top