pop-up form with control value based on data in another form

M

Mark J Kubicki

o.k. I'm lost... (sorry)

I have a form with list boxes for [manufacturer], and then a second list box
whose choices for the [catalogue number] are limited by the value of the
first...

I have a command button that shows an additional form (popup = yes) with a
text box whose value will be a third field [application notes] that is set
by the values in the [manufacturer] and [catalogue number] fields on the
first form. All (3) fields are in the same table, and the same record.
The value of the [application notes] should be linked to the values for
[manufacturer] and [catalogue number] on the first form and update when they
change.

does anyone know an example or a source that might have one?

thanks in advance,
mark
 
J

John Welch

One way you could do it would be to base the popup form on a query that
contains the fields manufacturer, cat number, and app notes from whatever
table has those three fields. Then in the code for your command button, open
the popup form using a where clause, like this:

docmd.openform "yourFormName",acNormal,"manufacturer = '" &
me.listManufacturer & "' AND [catalogue number] = " & me.listCatalogueNumber

Note the single quotes which are necessary if manufacturer is text. If it is
a number field, remove the single quotes. Check out help for "where
condition" of docmd.openform for more info.

hope this helps
-John
 

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

Top