O
omsoft
I have a form which I use to add and update data.
The code path for add and update is different.
For add, I bring up the form with the following code on a button click event.
stDocName = "frm_sessions"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
DoCmd.GoToRecord , , acNewRec
For update I first have a dropdown to determine which record to bring up to
modify. The query that runs to get the record is working. But the form is not
getting populated. I use the following to bring up the form.
stDocName = "frm_SessModify"
strQryName = "qry_ModSession"
DoCmd.OpenForm stDocName, , strQryName, , acFormEdit
The form does not come up but is not populated with data.
There are no compile problems. I have checked that. Is there anything in the
form properties where I should check to make sure the data is populated?
Thanks,
The code path for add and update is different.
For add, I bring up the form with the following code on a button click event.
stDocName = "frm_sessions"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
DoCmd.GoToRecord , , acNewRec
For update I first have a dropdown to determine which record to bring up to
modify. The query that runs to get the record is working. But the form is not
getting populated. I use the following to bring up the form.
stDocName = "frm_SessModify"
strQryName = "qry_ModSession"
DoCmd.OpenForm stDocName, , strQryName, , acFormEdit
The form does not come up but is not populated with data.
There are no compile problems. I have checked that. Is there anything in the
form properties where I should check to make sure the data is populated?
Thanks,