Hey all
Am currently having a major headache with my forms in Access!
I currently have a menu, which allows the user to select an ID to correspond to a document that the user would like to fill out details for. Once the user selects the ID, the menu form becomes invisible and the first form opens for the user to enter details for. The ID of the document the user is entering details for is also displayed on the first form by using this command ID.Value = Forms!Menu.IDCombo at form load.
[FONT="]
However when I then want to go to the second form (where more details need to be entered about the same document) the ID gets displayed to 0. I use the following code so the second form displays details of the same record entered in form 1.
Dim stLinkCriteria As String
stDocName = "Page2"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Although this command works for the second and third pages (where the ID is entered for the second page) it does not seem to work between the first and second form - as the form ID will display 0 all the time.
I thought I would then get form2 to obtain the ID in the same way as form1 at load. This shows the ID correctly, but when looking at the raw table, the data for form 2 does not get saved, but for form 1, 3 and 4 they do.
I am completely lost as to what to do, or what I am doing wrong?
Any help would be appreciated.
Many thanks in advance
sw.[/FONT]
Am currently having a major headache with my forms in Access!
I currently have a menu, which allows the user to select an ID to correspond to a document that the user would like to fill out details for. Once the user selects the ID, the menu form becomes invisible and the first form opens for the user to enter details for. The ID of the document the user is entering details for is also displayed on the first form by using this command ID.Value = Forms!Menu.IDCombo at form load.
[FONT="]
However when I then want to go to the second form (where more details need to be entered about the same document) the ID gets displayed to 0. I use the following code so the second form displays details of the same record entered in form 1.
Dim stLinkCriteria As String
stDocName = "Page2"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Although this command works for the second and third pages (where the ID is entered for the second page) it does not seem to work between the first and second form - as the form ID will display 0 all the time.
I thought I would then get form2 to obtain the ID in the same way as form1 at load. This shows the ID correctly, but when looking at the raw table, the data for form 2 does not get saved, but for form 1, 3 and 4 they do.
I am completely lost as to what to do, or what I am doing wrong?
Any help would be appreciated.
Many thanks in advance
sw.[/FONT]