Geoff,
 If the form you are opening is a bound form then on the button that opens the form (or  whatever event opens it) set a filter upon opening the form like so...

Docmd.OpenForm, "Form Name", acNormal,, "[record number]=" & me![record number]

There is a 'Where' property in the openForm command which is where I put the detail above.

Hope that helps

Duane Hennessy
Bandicoot Software
Tropical Queensland, Australia
(ABN: 33 682 969 957)

Your own personal library of code snippets.
http://www.bandicootsoftware.com.au

--- In [email protected], "Geoff B" <[EMAIL PROTECTED]> wrote:
>
> This is an Access question-
>
> I have a form that I call "Main" with buttons to open a bunch of other
> forms depending on what type of data I need to enter. The problem is,
> when I click the button to open another form, the key field "record
> number" is not populated. I would like the subform (if I should call
> it that) to be populated automatically when it opens with the record
> number that I entered on the "Main" form. Currently, I have to select
> that number from a drop-down menu, but that leaves room for error.
>
> Can anyone tell me what syntax I need to add to the buttons to achieve
> this? Thanks!
>



Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to