Tab Control effecting subform setvalue macro

M

Mark M S

I am using Access 2002.

I was having some issues with using the SetValue on subforms and learned
here that I need to identify the subform and subform control to get the
Setvalue macro to work. Now that I put about ten subforms on a Tab Controll
to see the subforms conveniently I can't get my setvalue macro to work.

Does the Tab Control influence how I identify the controls to be set in my
Setvalue Macro?

Main Form is VisitMain
Subform is Visit3
Control name is Pulmonary

If I use [Forms]![VisitMain]![Visit3]![Pulmonary] I get a Halt in Macro
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
M

Mark M S

The object you referenced in the Visual Basic Procedure as an OLE object
isn't an OLE Object
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
tina said:
try

[Forms]![VisitMain]![Visit3].[Form]![Pulmonary]

hth


Mark M S said:
I am using Access 2002.

I was having some issues with using the SetValue on subforms and learned
here that I need to identify the subform and subform control to get the
Setvalue macro to work. Now that I put about ten subforms on a Tab Controll
to see the subforms conveniently I can't get my setvalue macro to work.

Does the Tab Control influence how I identify the controls to be set in
my
Setvalue Macro?

Main Form is VisitMain
Subform is Visit3
Control name is Pulmonary

If I use [Forms]![VisitMain]![Visit3]![Pulmonary] I get a Halt in Macro
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
T

tina

hmm, okay. is Visit3 the name of the *subform control* within the main form?
to verify that you're using the correct name: open the main form in design
view. click once on the subform control to select it. in the Properties box,
click on the Other tab and look at the Name property. there's the correct
name of the subform control.

if your macro still doesn't work when you're definitely using the correct
subform control name, then i'd suggest setting the value of the control with
VBA, rather than using a macro.

btw, and to answer the question in your first post, the TabControl has no
bearing on the syntax of a control reference in a form.

hth


Mark M S said:
The object you referenced in the Visual Basic Procedure as an OLE object
isn't an OLE Object
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
tina said:
try

[Forms]![VisitMain]![Visit3].[Form]![Pulmonary]

hth


Mark M S said:
I am using Access 2002.

I was having some issues with using the SetValue on subforms and learned
here that I need to identify the subform and subform control to get the
Setvalue macro to work. Now that I put about ten subforms on a Tab Controll
to see the subforms conveniently I can't get my setvalue macro to work.

Does the Tab Control influence how I identify the controls to be set in
my
Setvalue Macro?

Main Form is VisitMain
Subform is Visit3
Control name is Pulmonary

If I use [Forms]![VisitMain]![Visit3]![Pulmonary] I get a Halt in Macro
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 

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