Access Asking for Parameter Input

N

nigelf

I am passing parameters to a form in a dialog, opened in the ONLoad event of
my form. However, the default input parameter dialog is being displayed
before my own dialog i.e. BEFORE the OnLoad event is triggered....

I have had this type of thing working before, but I can't see what I doing
differently this time!

Any help much appreciated
 
N

nigelf

Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form
 
D

Douglas J. Steele

I don't believe it's possible for a form's recordsource to refer to a
control on itself.

You could try using

SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop

as the recordsource, and then setting a filter once a value has been
supplied for ShopID.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form


Gina Whipp said:
Nigelf,

Please show code... we can't see it from here or at least, I can't!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
N

nigelf

Sorry! I'm just getting back into programming after about 5 years' absence
and I have to learn to explain my problems better!

The form I am opening is called frmLinkAisleToItem, and in its OnLoad event
I am calling OpenForm dlgParamCollect, Form, , , Edit, Dialog within a Macro

The SQL -
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));

as the recordsource is specified in the frmLinkAisleToItem form, so I'm
expecting the dlgParamCollect to have been shown, parameter selected and
hidden before frmLinkAisleToItem displays.

The parameter being requested is =[Forms]![dlgParamCollect]![ShopID]

I hope this clarifies my problem sufficiently....

cheers!


Douglas J. Steele said:
I don't believe it's possible for a form's recordsource to refer to a
control on itself.

You could try using

SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop

as the recordsource, and then setting a filter once a value has been
supplied for ShopID.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form


Gina Whipp said:
Nigelf,

Please show code... we can't see it from here or at least, I can't!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I am passing parameters to a form in a dialog, opened in the ONLoad
event
of
my form. However, the default input parameter dialog is being displayed
before my own dialog i.e. BEFORE the OnLoad event is triggered....

I have had this type of thing working before, but I can't see what I
doing
differently this time!

Any help much appreciated
 
D

Douglas J. Steele

How are you hiding form dlgParamCollect? It sounds to me that you may be
closing it, not hiding it.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Sorry! I'm just getting back into programming after about 5 years' absence
and I have to learn to explain my problems better!

The form I am opening is called frmLinkAisleToItem, and in its OnLoad
event
I am calling OpenForm dlgParamCollect, Form, , , Edit, Dialog within a
Macro

The SQL -
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));

as the recordsource is specified in the frmLinkAisleToItem form, so I'm
expecting the dlgParamCollect to have been shown, parameter selected and
hidden before frmLinkAisleToItem displays.

The parameter being requested is =[Forms]![dlgParamCollect]![ShopID]

I hope this clarifies my problem sufficiently....

cheers!


Douglas J. Steele said:
I don't believe it's possible for a form's recordsource to refer to a
control on itself.

You could try using

SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop

as the recordsource, and then setting a filter once a value has been
supplied for ShopID.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form


:

Nigelf,

Please show code... we can't see it from here or at least, I can't!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I am passing parameters to a form in a dialog, opened in the ONLoad
event
of
my form. However, the default input parameter dialog is being
displayed
before my own dialog i.e. BEFORE the OnLoad event is triggered....

I have had this type of thing working before, but I can't see what I
doing
differently this time!

Any help much appreciated
 
N

nigelf

Thanks for your ongoing help Douglas.
I am just setting the visible property to NO! So the dialog is still open
and I can reference it within debugging messages once the designated form has
opened. Something in the event process is calling the query before the Onload
Event which is why the default input box is displayed.

I started this code about 15 months ago and I'm sure it worked then.

cheers

Douglas J. Steele said:
How are you hiding form dlgParamCollect? It sounds to me that you may be
closing it, not hiding it.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Sorry! I'm just getting back into programming after about 5 years' absence
and I have to learn to explain my problems better!

The form I am opening is called frmLinkAisleToItem, and in its OnLoad
event
I am calling OpenForm dlgParamCollect, Form, , , Edit, Dialog within a
Macro

The SQL -
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));

as the recordsource is specified in the frmLinkAisleToItem form, so I'm
expecting the dlgParamCollect to have been shown, parameter selected and
hidden before frmLinkAisleToItem displays.

The parameter being requested is =[Forms]![dlgParamCollect]![ShopID]

I hope this clarifies my problem sufficiently....

cheers!


Douglas J. Steele said:
I don't believe it's possible for a form's recordsource to refer to a
control on itself.

You could try using

SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop

as the recordsource, and then setting a filter once a value has been
supplied for ShopID.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form


:

Nigelf,

Please show code... we can't see it from here or at least, I can't!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I am passing parameters to a form in a dialog, opened in the ONLoad
event
of
my form. However, the default input parameter dialog is being
displayed
before my own dialog i.e. BEFORE the OnLoad event is triggered....

I have had this type of thing working before, but I can't see what I
doing
differently this time!

Any help much appreciated
 
D

Douglas J. Steele

Double check that the name of the control on the form hasn't changed.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


nigelf said:
Thanks for your ongoing help Douglas.
I am just setting the visible property to NO! So the dialog is still open
and I can reference it within debugging messages once the designated form
has
opened. Something in the event process is calling the query before the
Onload
Event which is why the default input box is displayed.

I started this code about 15 months ago and I'm sure it worked then.

cheers

Douglas J. Steele said:
How are you hiding form dlgParamCollect? It sounds to me that you may be
closing it, not hiding it.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


nigelf said:
Sorry! I'm just getting back into programming after about 5 years'
absence
and I have to learn to explain my problems better!

The form I am opening is called frmLinkAisleToItem, and in its OnLoad
event
I am calling OpenForm dlgParamCollect, Form, , , Edit, Dialog within a
Macro

The SQL -
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));

as the recordsource is specified in the frmLinkAisleToItem form, so I'm
expecting the dlgParamCollect to have been shown, parameter selected
and
hidden before frmLinkAisleToItem displays.

The parameter being requested is =[Forms]![dlgParamCollect]![ShopID]

I hope this clarifies my problem sufficiently....

cheers!


:

I don't believe it's possible for a form's recordsource to refer to a
control on itself.

You could try using

SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop

as the recordsource, and then setting a filter once a value has been
supplied for ShopID.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Didn't provide code since I'm trying to use Access functionality

I have a macro call mcrOpenDialog, called in OnLoad event of form:
OpenForm dlgParamCollect, Form, , , Edit, Dialog

And the SQL:
SELECT tblShop.ShopID, tblShop.ShopName
FROM tblShop
WHERE (((tblShop.ShopID)=[Forms]![dlgParamCollect]![ShopID]));
This query is identified in the Record Source property of the form


:

Nigelf,

Please show code... we can't see it from here or at least, I
can't!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I am passing parameters to a form in a dialog, opened in the
ONLoad
event
of
my form. However, the default input parameter dialog is being
displayed
before my own dialog i.e. BEFORE the OnLoad event is
triggered....

I have had this type of thing working before, but I can't see
what I
doing
differently this time!

Any help much appreciated
 
N

nigelf

My Problem Is that the query bound to the form seems to execute before the
OnLoad event of the form. Does anybody know why this is?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top