Question : Access VBA Query Parameter

Hi,

I have an form called frmMain and I have a subform which is as query. The query ask the user to enter a parameter and the form opens fine.

My question is how can I open this form via vba and pass the parameter value into the query so it loads up like it would as above? I'm using Access 2000 and I cannot use the OpenQueryDefs method.

Thanks,



Answer : Access VBA Query Parameter

Sorry, I've slightly missunderstood your question.

On the form, create a new text box called "txtISIN"
When the form opens, put the OpenArgs into the textbox:
txtISIN = Me.OpenArgs

If the query has a filter which opens a parameter [Please Enter Bonds ISIN], you should then change this to:

Forms!frmPriceUpdate!txtISIN

Hope this works!

Random Solutions  
 
programming4us programming4us