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
 
Back
Top