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

Get value from subform

Status
Not open for further replies.

chris5g

Programmer
Joined
Aug 21, 2001
Messages
48
Location
US
Hi, Here is my problem:

I have a main form with sub forms. On the sub form I have a text field that equals =Sum(ProjectHours). I want to take that value and assign it to a text field on the main form.
This is the code that was working at home but at work it does not.

Private Sub Form_Current()
Me.AproxProjectHours = Me.TaskListTable_subform.Controls("text15")

End Sub

....my other programs are better
 
Perhaps try
forms!form_name_here!Field_Name_Here.value = me.AproxProjectHours

me.refresh 'Need to refresh main form? not sure if you can call this or not...

'may need
forms!form_name_here.Refresh Recalc or Requery?

htwh,




Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top