Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refresh unbound calculated control in subform 1

Status
Not open for further replies.
Jan 14, 2002
143
US
Howdy,

I need to refresh an unbound calculated control in a subform on the after update event of another embedded form within the main form - this is turning out to be more of a challenge than it ever ought to.

I have tried requerying and refreshing both the subform and the control itself. I also tried:

form![main form]![subform]![unbound control]=MyQueryValue
but in the immediate window it returns 'false'. I don't understand this - I never seen it compare values using '='.

Has anyone dealt with something like this? If so, I'd appreciate a tip.

Thanks
-Blaine
 
Just looking at
form![main form]![subform]![unbound control]=MyQueryValue

I would suspect that your reference is wrong.

Try
Forms!frmMainFormName!subFormControlName.Form!txtUnboundControlName.Requery

Forms : Needs an S at the end.

frmMainFormName : The name of the main form

subFormControlName : THIS is the one that most people get wrong. This must be the name of the subFormCONTROL what you placed on the main form. NOT the name of the subform that appears within it. ( They can be called the same thing - but aren't always. So check you have the right name.

.Form : Then tell VB that you want to consider this as an fully qualified Form Name

txtUnboundControlName : Then identify the control on the subForm

.Requery : Then Requery it.



'ope-that-'elps.

G LS
 
Thanks for the help GLS. It will requery on the immediate window but NOT on the afterupdate event. Do you (or anybody else) know why this might be?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top