T
TotallyLost via AccessMonster.com
I have two forms and I really need to be open one from another.
Two Forms:
Main Form
Return Record
and I want to be able to click on the field in the Main Form called "RMA
Number" and it brings up the Return Record with that RMA and coorisponding
info. I have the RMA as my primary key and have tried a few different ways
and I've check each fields spelling multiple times and there all the same.
When I do the openform macro, it opens to the first record everytime, doesnt
matter which RMA number I click on.
[RMA Number]=Forms![Return Record]![RMA Number]
I also tried doing this is VB, and get an error in which it cant find a field.
my click command code is:
Private Sub RMA_Number_Click()
On Error GoTo Err_RMA_Number_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = [ReturnRecord]
stLinkCriteria = "[RMA_Number]=" & Forms![ReturnRecord]![RMA_Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_RMA_Number_Click:
Exit Sub
Err_RMA_Number_Click:
MsgBox Err.Description
Resume Exit_RMA_Number_Click
End Sub
Any help? Im new to access and am going crazy
Two Forms:
Main Form
Return Record
and I want to be able to click on the field in the Main Form called "RMA
Number" and it brings up the Return Record with that RMA and coorisponding
info. I have the RMA as my primary key and have tried a few different ways
and I've check each fields spelling multiple times and there all the same.
When I do the openform macro, it opens to the first record everytime, doesnt
matter which RMA number I click on.
[RMA Number]=Forms![Return Record]![RMA Number]
I also tried doing this is VB, and get an error in which it cant find a field.
my click command code is:
Private Sub RMA_Number_Click()
On Error GoTo Err_RMA_Number_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = [ReturnRecord]
stLinkCriteria = "[RMA_Number]=" & Forms![ReturnRecord]![RMA_Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_RMA_Number_Click:
Exit Sub
Err_RMA_Number_Click:
MsgBox Err.Description
Resume Exit_RMA_Number_Click
End Sub
Any help? Im new to access and am going crazy