Well I tried to make SubForms but its horrible. The automatic way makes the first form as it suppose to be and the second is a table. I don't want a table.
So I tried to get the command of the button but its very confused. It's not only one command session.
So, I would like to keep my forms the way it is. And I create a button, using the interface, that will open the other form and the code is exactly what I'm using.
Code:
Private Sub Comando19_Click()
On Error GoTo Err_Comando19_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Dados dos Condutores"
stLinkCriteria = "[Number to Copy]=" & Me![Number to copy]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Comando19_Click:
Exit Sub
Err_Comando19_Click:
MsgBox Err.Description
Resume Exit_Comando19_Click
End Sub
So I'm in the right path.
I just need help on how to change the command below, so access will understand which one is the correct field.
Code:
stLinkCriteria = "[Number to Copy]=" & Me![Number to copy]
Or I need to change the name of that field, which seems impossible. Where can I see the real name of a field? Where can I change this name?