Enter parameter value---Says who?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi there stranger,

I was wondering if you can help!

I have a combo box on formA which has the following code
on its double click event:

***************************************************
Dim s_LkCrit As String
s_LkCrit = "[InvP_ID]=" & Me![InvP_ID]
DoCmd.OpenForm "frm_InvP", acNormal, , s_LkCrit, ,acDialog
***************************************************

When I double click on this combo box in formA, the
frm_InvP form should open on the record where its InvP_ID
field matches the InvP_ID field on the formA(which is the
name of my combo box and also is the name of its first
column).

However at the [DoCmd.OpenForm.....] line, I get a little
window which in its title bar says "Enter parameter
value" where I should enter a value for "InvP_ID". I have
used the above code fragment aproximately 100 times all
over my applications without ever getting this. This is
the first time and I am wondering if there is some
property setting in the frm_InvP that should be set.

Another thing is that the record source for the frm_InvP
form is a query, however, there is only 1 field there.
Output all fields is also set to "yes".

Would you have any ideas why this "Enter parameters
value" window mysteriously comes up!

Thanking you in advance, Bob.
 
You sure the text box on your form is named InvP_ID? If it is, is it bound
to a field named InvP_ID? If so, rename the text box (say to txtInvP_ID) and
refer to the new name in your criteria.
 
I have figured it out, I had the ID field spelled one way
in the control and the query. And another way in the
table.

I thank you anyway, and you were in the right trail in
your solution. It was indeed a variable naming problem.

Thanks buddy, I really appreciate your help and your time.

Bob
-----Original Message-----
You sure the text box on your form is named InvP_ID? If it is, is it bound
to a field named InvP_ID? If so, rename the text box (say to txtInvP_ID) and
refer to the new name in your criteria.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Hi there stranger,

I was wondering if you can help!

I have a combo box on formA which has the following code
on its double click event:

***************************************************
Dim s_LkCrit As String
s_LkCrit = "[InvP_ID]=" & Me![InvP_ID]
DoCmd.OpenForm "frm_InvP", acNormal, , s_LkCrit, ,acDialog
***************************************************

When I double click on this combo box in formA, the
frm_InvP form should open on the record where its InvP_ID
field matches the InvP_ID field on the formA(which is the
name of my combo box and also is the name of its first
column).

However at the [DoCmd.OpenForm.....] line, I get a little
window which in its title bar says "Enter parameter
value" where I should enter a value for "InvP_ID". I have
used the above code fragment aproximately 100 times all
over my applications without ever getting this. This is
the first time and I am wondering if there is some
property setting in the frm_InvP that should be set.

Another thing is that the record source for the frm_InvP
form is a query, however, there is only 1 field there.
Output all fields is also set to "yes".

Would you have any ideas why this "Enter parameters
value" window mysteriously comes up!

Thanking you in advance, Bob.


.
 
Back
Top