469,632 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

Input Parameter Query Window - Duplicated?

Hi,
I have created a Subform which SourceObject is a parameter query.

This is the Query:
Qry Name:80IsscomProduct

SELECT *
FROM Isscomp28
WHERE [BPP_NM] Like [Enter Product Name];

This is the code attached to a cmd button that updates a subform with
the result of the paramenter Query.

Private Sub CmdIsscombyName_Click()
'**** Update Subform
Me!sfrInfo.SourceObject = "Query.80IsscomProduct"
'**** Update Label of Subform
Me!lblSfrInfo.Caption = "Complete Isscom List by Product"
End Sub

The problem:

The Enter Parameter Window seems to be duplicated. I fill out the
parameter and press Enter and the Enter Parameter Window appears again.

Any ideas why is this happening?
By now i can bypass the first Input Parameter pressing enter. I think I
can use sendkeys for solving this.....
Regards
LC

Nov 13 '05 #1
1 2376
On the form with the button, place a textbox to enter the parameter's value
in. Once the value has been entered, click the button. Change the parameter
in the query to point to this textbox and it will get the value from there
instead of prompting you.

Example:
WHERE [BPP_NM] Like [Forms]![MyForm]![MyTextbox];

--
Wayne Morgan
MS Access MVP
<ca******@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,
I have created a Subform which SourceObject is a parameter query.

This is the Query:
Qry Name:80IsscomProduct

SELECT *
FROM Isscomp28
WHERE [BPP_NM] Like [Enter Product Name];

This is the code attached to a cmd button that updates a subform with
the result of the paramenter Query.

Private Sub CmdIsscombyName_Click()
'**** Update Subform
Me!sfrInfo.SourceObject = "Query.80IsscomProduct"
'**** Update Label of Subform
Me!lblSfrInfo.Caption = "Complete Isscom List by Product"
End Sub

The problem:

The Enter Parameter Window seems to be duplicated. I fill out the
parameter and press Enter and the Enter Parameter Window appears again.

Any ideas why is this happening?
By now i can bypass the first Input Parameter pressing enter. I think I
can use sendkeys for solving this.....
Regards
LC

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by rgonzale6 | last post: by
5 posts views Thread by gimme_this_gimme_that | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.