UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Parent form    
 
   
Grafixx01
post Aug 12 2006, 08:04 PM
Post #1

UtterAccess Veteran
Posts: 450
From: Texas



Ok, so I kind of figured out how to get my date button to work so that it will put the selected dates into the txt.(name) boxes on the form. Well, at least I figured out the coding for it.

Now the problem I can't figure out is how to define a parent form? The form that would be the parent form is frmTaskLog

Anyone?
Go to the top of the page
 
+
Aquadevel
post Aug 12 2006, 08:11 PM
Post #2

UtterAccess VIP
Posts: 6,898
From: Earth...



Graf,

Can you provide a lil' more info on what you are trying to do ?
Even post the database <mnus any sensitive data> would help.

good luck, (IMG:http://www.utteraccess.com/forum/style_emoticons/default/sad.gif)

Aqua
Go to the top of the page
 
+
dashiellx2000
post Aug 12 2006, 08:41 PM
Post #3

UtterAccess VIP
Posts: 9,209
From: Maryland



Do you mean Refering to Forms/Subforms Properties and Controls?
Go to the top of the page
 
+
Grafixx01
post Aug 13 2006, 11:32 AM
Post #4

UtterAccess Veteran
Posts: 450
From: Texas



This is the issue. The command button is there and when you select the date and click "Insert Date" I want it to insert the selected date into a txtBox on a main form called, frmTaskLog.

Code:

Private Sub cmd_Insert_Date_Click()

Me.Visible = False 'changed
Forms(strParentForm).Controls(strTextBox).SetFocus 'changed
Forms(strParentForm).Controls(strTextBox).Text = CDate(calCalendar.Value) 'changed
DoCmd.Close acForm, Me.Name, acSaveNo 'changed

End Sub
Go to the top of the page
 
+
R. Hicks
post Aug 13 2006, 11:37 AM
Post #5

UA Forum Administrator
Posts: 38,073
From: Birmingham, Alabama USA



To reference a control in the parent (main) form from the subform .. use:

Me.Parent.YourControlName =

Where "YourControlName" is the actual name of the control being referenced in the parent form ...

RDH
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 02:08 PM