The standard template for Order Entry has
this function, If you don’t find an answer here try the db wizard and
view the code.
This works as long as there
is an existing record in the table with
the ID Number I'm entering on the Main form.
Is there a way to
display a new record in the subform, which is
populated with the ID
Number I entered on the Main form, if the ID
Number does not already
exist in the table that is linked to the subform?
Thanks for your help!
Geoff
--- In [email protected],
"Duane Hennessy"
<[EMAIL PROTECTED]> wrote:
>
> 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
YAHOO! GROUPS LINKS