Subform naming convention

  • Thread starter EMILYTAN via AccessMonster.com
  • Start date
E

EMILYTAN via AccessMonster.com

I have this code :-

wM_Qty = Nz(DSum("[M_Qty]", "Misc", "[PartNumber]=""" & Forms!Inventory!
PartNumber & """"), 0)

I already put this M_Qty in the subform, so the "Forms!Inventory!PartNumber "
has to follow the sub form naming convention, but I am sorry to say I don't
know how to change it to subform naming...

Anyone can help me?
 
S

Steve

NameOfMainForm!NameOfSubformControl.Form!NameOfControlOnSubform

The error is usually made in putting the name of the subform where the name
of the subform control goes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
E

EMILYTAN via AccessMonster.com

Can you give me an example :

Main form is Misc
subform is MisTran
control in subform is txtPartNumber
NameOfMainForm!NameOfSubformControl.Form!NameOfControlOnSubform

The error is usually made in putting the name of the subform where the name
of the subform control goes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
I have this code :-
[quoted text clipped - 8 lines]
Anyone can help me?
 
S

StopThisAdvertising

Steve said:
NameOfMainForm!NameOfSubformControl.Form!NameOfControlOnSubform

The error is usually made in putting the name of the subform where the name
of the subform control goes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)

--
Steve, you have one of two choices:
-- Tell us you will stop advertising here, or...
-- get lost for another year or so...
http://home.tiscali.nl/arracom/whoissteve.html
(Until now 2459 pageloads, 1819 first-time visitors)

FYI: (this is also to inform those who do not understand...)
This is *not* about the sigline...although we do not 'love' it, we don't mind the current sigline.
But we will simply continue to hunt down *each and every* of your posts.

It is not relevant whether you advertised in *this* particular post or not...
Your pattern is: You post a few 'good' answers and then start to advertise again.

These groups are *not* your private hunting grounds!
You should know this by now.

ArnoR
 
D

Douglas J. Steele

Forms!Misc!MisTran.Form!txtPartNumber

Of course, depending on how you added MisTran as a subform to Misc, the
subform control on Misc may not be named MisTran. It's the name of the
control on the parent form you need to use, not the name of the form being
used as a subform.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


EMILYTAN via AccessMonster.com said:
Can you give me an example :

Main form is Misc
subform is MisTran
control in subform is txtPartNumber
NameOfMainForm!NameOfSubformControl.Form!NameOfControlOnSubform

The error is usually made in putting the name of the subform where the
name
of the subform control goes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
I have this code :-
[quoted text clipped - 8 lines]
Anyone can help me?
 
S

Steve

Iy sounds like you made the typical mistake! The name of the subform dies
not enter into it! Open the main form in design view and select the border
around the subform. This is the subform control. Open properties and go to
the Other tab. Look at the name property. Let's say the name is "Emilytan".
Using your example the syntax for referring to a control on the subform is:
Forms!Misc!Emilytan.Form!txtPartNumber

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)




EMILYTAN via AccessMonster.com said:
Can you give me an example :

Main form is Misc
subform is MisTran
control in subform is txtPartNumber
NameOfMainForm!NameOfSubformControl.Form!NameOfControlOnSubform

The error is usually made in putting the name of the subform where the
name
of the subform control goes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
I have this code :-
[quoted text clipped - 8 lines]
Anyone can help me?
 
E

EMILYTAN via AccessMonster.com

Thanks for your help Steve...
Glad to see your reply....haha
Iy sounds like you made the typical mistake! The name of the subform dies
not enter into it! Open the main form in design view and select the border
around the subform. This is the subform control. Open properties and go to
the Other tab. Look at the name property. Let's say the name is "Emilytan".
Using your example the syntax for referring to a control on the subform is:
Forms!Misc!Emilytan.Form!txtPartNumber

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
Can you give me an example :
[quoted text clipped - 18 lines]
 

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