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
[email protected]
 
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
[email protected]
I have this code :-
[quoted text clipped - 8 lines]
Anyone can help me?
 
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
[email protected]
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
[email protected]




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
[email protected]
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
[email protected]
Can you give me an example :
[quoted text clipped - 18 lines]
 
Top