Continuous Form Default Value

G

Guest

I am using a button on a continuos form to open another form in AddMode. No
problem. I then want to set the defualt value of the newly opened form,
frmISSAdd, to = the LocID field on the continuous form. Since the value in
any of the forms will be the same as they are filtered from a listbox, It
doesn't matter which of the forms Access takes as the value.

I tried using =[forms]![frmDiscipline]![subDiscReferral]![LocID]

The form opens in Add mode and then I get a #Name? in the LocID field.
 
G

Guest

I tried that and several others from the web site in the above reply to no
avail. Is there a way to have a form open in add mode and have the new form
open with the value from the continuous form?

docmd.openform "frmIssAdminAdd",,,,acAdd,,"LocID ="& Me.LocID

I have tried that and this above, but it still comes up blank.
--
Thanks As Always
Rip


Arvin Meyer said:
Try:

=[forms]![frmDiscipline]![subDiscReferral].Form![LocID]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Ripper said:
I am using a button on a continuos form to open another form in AddMode.
No
problem. I then want to set the defualt value of the newly opened form,
frmISSAdd, to = the LocID field on the continuous form. Since the value
in
any of the forms will be the same as they are filtered from a listbox, It
doesn't matter which of the forms Access takes as the value.

I tried using =[forms]![frmDiscipline]![subDiscReferral]![LocID]

The form opens in Add mode and then I get a #Name? in the LocID field.
 
A

Arvin Meyer [MVP]

This line is incorrect:

docmd.openform "frmIssAdminAdd",,,,acAdd,,"LocID ="& Me.LocID

It should look like:

docmd.openform "frmIssAdminAdd",,,"LocID =" & Me.LocID

assuming that the second LocID (as in Me.LocID) is the name of the textbox
holding the value of the LocID field.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Ripper said:
I tried that and several others from the web site in the above reply to no
avail. Is there a way to have a form open in add mode and have the new
form
open with the value from the continuous form?

docmd.openform "frmIssAdminAdd",,,,acAdd,,"LocID ="& Me.LocID

I have tried that and this above, but it still comes up blank.
--
Thanks As Always
Rip


Arvin Meyer said:
Try:

=[forms]![frmDiscipline]![subDiscReferral].Form![LocID]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Ripper said:
I am using a button on a continuos form to open another form in AddMode.
No
problem. I then want to set the defualt value of the newly opened
form,
frmISSAdd, to = the LocID field on the continuous form. Since the
value
in
any of the forms will be the same as they are filtered from a listbox,
It
doesn't matter which of the forms Access takes as the value.

I tried using =[forms]![frmDiscipline]![subDiscReferral]![LocID]

The form opens in Add mode and then I get a #Name? in the LocID field.
 

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