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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subform question

Status
Not open for further replies.

Ielamrani

MIS
Jul 7, 2005
183
US
This sounds very simple but I am having trouble making it work.
I have a form (frmMain)with a subform in it. in the frmMain I have a text box called txtDate and another text box in the subform called txtCheckDt.
what I am trying to do is: whatever date is typed in txtCheckDt (in subform) should appear in txtDate (frmMain).

I tried this putting the following in Control source or Default value of txtDate but I get error #name?:

=[Forms]![TMarketingCall subform]![txtCheckDt]

 
I am sorry I tried your suggestions =Me![TMarketingCall subform].Form![txtCheckDt] , no error message but still not working.
I can't access the site you recommended because they blocked it here at work. I'll try it when I go home.
Thanks
Ismail
 
no error message but still not working
So, what happens ?

You may try this in the AfterUpdate event procedure of the txtCheckDt control:
Me.Parent.Recalc

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You could do this with unbound txtDate. With bound txtDate the record will not show up on your table. Unless someone out there knows of a way....

-In design view place an unbound text box at the bottom
your subform's form footer.
Make the Control Source..... =[txtCheckDt]and name it something. e.g. checkdate
-Then on your Main Form's txtDate
Make the Control Source...=[TMarketingCall subform].Form!checkdate
 
How are ya Ielamrani . . .

I have no problem with:
Code:
[blue]   =[[purple][b]TMarketingCall subform[/b][/purple]].Form![txtCheckDt][/blue]
[ol][li]Be sure to disable the code in the AfterUpdate event of [blue]txtDate[/blue].[/li]
[li]Double check the names/spelling.[/li]
[li]Is it your intent that [blue]txtDate[/blue] is unbound?[/li][/ol]


Calvin.gif
See Ya! . . . . . .
 
Hi All,
I am sorry to reply late but I had no idea that you guys send me new solutions. Anyway, Good news. The last suggestions worked =[TMarketingCall subform].Form![txtCheckDt] Which means that PHV solution was good as well.
The Only change I did is: I put the code in the control source of the text box instead of After Update.

Thank you all for your help.

Ismail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top