M
ms
i'm hoping for some guidance on the best practice for the
following situation:
i have a form with a combobox. one column (bound) has an
id, the other has a project name. rowsource is based on
query.
when a user selects a project, i want to open another form
allowing them to edit the other fields in the database for
this project based on its id.
i want the form to be unbound to the record, requiring a
submit button be pressed before the record is updated.
what i don't know is the best way to pass the id from the
first form to the open event of the second form so i can
run my sql and then populate the various text fields w/
the right data.
is it possible to use the criteria when opening the form?
ie
stLinkCriteria = "Project_ID=" & parProject
DoCmd.OpenForm stDocName, , , stLinkCriteria
if so, how is this retreived in the second form?
or do i have to refer back to the first form from the
second like:
mySQLParameter = Forms!frmOne!Project_List.Value
this just seems messy to me. would prefer it me more 'self
contained' if that makes sense.
any help/thoughts/direction appreciated. thanks.
ms
following situation:
i have a form with a combobox. one column (bound) has an
id, the other has a project name. rowsource is based on
query.
when a user selects a project, i want to open another form
allowing them to edit the other fields in the database for
this project based on its id.
i want the form to be unbound to the record, requiring a
submit button be pressed before the record is updated.
what i don't know is the best way to pass the id from the
first form to the open event of the second form so i can
run my sql and then populate the various text fields w/
the right data.
is it possible to use the criteria when opening the form?
ie
stLinkCriteria = "Project_ID=" & parProject
DoCmd.OpenForm stDocName, , , stLinkCriteria
if so, how is this retreived in the second form?
or do i have to refer back to the first form from the
second like:
mySQLParameter = Forms!frmOne!Project_List.Value
this just seems messy to me. would prefer it me more 'self
contained' if that makes sense.
any help/thoughts/direction appreciated. thanks.
ms