469,600 Members | 2,230 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

filling in control on newly opened form

I know I've done this before but I can't find where I did it or remember
exactly how. The situation is this:

There is a form of equipment with primary key EquipID. There a continuous
subform of log items related to each EquipID. If the user dbl clicks a log
item, it opens up a second form, frmLogItems and shows only the log entry
they double clicked. No problems here. On the first main form, there is also
a command button to enter a new log item. This opens up that same form only
to a new record. The problem is, EquipID is now null, so the user would have
to specifically select the piece of equipment that the log entry is related
to. Isn't there a way to open up the form to a new record and automatically
pass it the EquipID value?
Nov 2 '06 #1
1 1163
On Thu, 02 Nov 2006 01:55:06 GMT, "Jimmy" <no**@none.comwrote:

Yes. Read up on DoCmd.OpenForm, specifically the last argument =
OpenArgs. That's an elegant way to pass information to the form, and
in the Form_Open it can set EquipID to the passed-in value.

-Tom.

>I know I've done this before but I can't find where I did it or remember
exactly how. The situation is this:

There is a form of equipment with primary key EquipID. There a continuous
subform of log items related to each EquipID. If the user dbl clicks a log
item, it opens up a second form, frmLogItems and shows only the log entry
they double clicked. No problems here. On the first main form, there is also
a command button to enter a new log item. This opens up that same form only
to a new record. The problem is, EquipID is now null, so the user would have
to specifically select the piece of equipment that the log entry is related
to. Isn't there a way to open up the form to a new record and automatically
pass it the EquipID value?
Nov 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jim Stacey | last post: by
3 posts views Thread by Omar Llanos | last post: by
3 posts views Thread by ApexData | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.