childrenfirst
Technical User
Hi,
I have two forms in the Access Project file. When I click on the command button on the frmMain, a value should be loaded into the other form, frmList. However, my code does not seem to retrieve and load the value into frmList properly. Any advice will be greatly appreciated!
Here is what I have tried so far:
Dim strReportNum AS String
strReportNum = "SELECT MAX(ListNum) FROM List"
DoCmd.OpenForm "frmList"
Form![frmList]![txtListNum] = strReportNum
I also tried:
DoCmd.OpenForm "frmList"
Form![frmList]![txtListNum] = "SELECT MAX(ListNum) FROM List"
None of them worked so far...
Happy holiday!
I have two forms in the Access Project file. When I click on the command button on the frmMain, a value should be loaded into the other form, frmList. However, my code does not seem to retrieve and load the value into frmList properly. Any advice will be greatly appreciated!
Here is what I have tried so far:
Dim strReportNum AS String
strReportNum = "SELECT MAX(ListNum) FROM List"
DoCmd.OpenForm "frmList"
Form![frmList]![txtListNum] = strReportNum
I also tried:
DoCmd.OpenForm "frmList"
Form![frmList]![txtListNum] = "SELECT MAX(ListNum) FROM List"
None of them worked so far...
Happy holiday!