J
jshrop
Hello Everyone,
Been searching through here, and can't find a solution to my problem,
so thought I would give it a go with a post.
I have a form that opens data from table a. There is a linked field in
table a to the same field name in table b. I am trying to create a
function to jump from the form displaying the table a fields to the
table b fields based on the link criteria that those two fields are
identical. Here is my code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fInquiries"
stLinkCriteria = "[Inquiry_Reference_Number] =" &
Me![Inquiry_Reference_Number]
'MsgBox (stLinkCriteria)
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Very straight forward, but for the life of me, I cannot figure out why
it brings up the text entry box asking for a parameter, with the box
title being the Me![Inquiry_Reference_Number]. When I added the msg
box, it displays the correct string that I want as my link criteria, so
it makes no sense to me why it brings up the parameter entry box.
Any help provided would be greatly appreciated!
Been searching through here, and can't find a solution to my problem,
so thought I would give it a go with a post.
I have a form that opens data from table a. There is a linked field in
table a to the same field name in table b. I am trying to create a
function to jump from the form displaying the table a fields to the
table b fields based on the link criteria that those two fields are
identical. Here is my code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fInquiries"
stLinkCriteria = "[Inquiry_Reference_Number] =" &
Me![Inquiry_Reference_Number]
'MsgBox (stLinkCriteria)
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Very straight forward, but for the life of me, I cannot figure out why
it brings up the text entry box asking for a parameter, with the box
title being the Me![Inquiry_Reference_Number]. When I added the msg
box, it displays the correct string that I want as my link criteria, so
it makes no sense to me why it brings up the parameter entry box.
Any help provided would be greatly appreciated!