View Full Version : list box questions


LeslieB
04-19-2001, 06:38 AM
What's the general syntax for opening a new form based on selecting an item from a list box?

Do I need the OpenArgs method if I want to carry the value from the listbox and display the record on the form it opens up when clicked? If so, please give me the syntax for that as well!

(HELP hasn't been much help for these particular questions)

AlanS
04-19-2001, 12:15 PM
I use:

DoCmd.OpenForm [form_name as string]

with the optional WhereCondition argument specifying any limitations on which records may be displayed. If the WhereCondition argument doesn't uniquely identify the desired record, you could also have the form's OnOpen event procedure refer to the value of the listbox on the first form (assuming that form is still open) to locate the correct record.