Tabbed form and Calendar control

thart21

Registered User.
Local time
Yesterday, 21:45
Joined
Jun 18, 2002
Messages
236
I have been using a calendar control on a subform and have now split the data into a tabbed form with 4 subforms. The calendar is now entering the date selected into the first record of each subform instead of just the one on the subform that has the focus.

Do I need to add the calendar control to each subform now or is there a way to reference the correct form in my current code?

Private Sub Calendar_Click()

' Enters the selected date into the DateCompleted field


Forms![Training]![ElectiveTrainingSub].Form.[Date].Value = Me.Calendar.Value
Forms![Training]![CorpReqSubform].Form.[Date].Value = Me.Calendar.Value
Forms![Training]![XOGReqSub].Form.[Date].Value = Me.Calendar.Value
Forms![Training]![Recommended Training].Form.[Date].Value = Me.Calendar.Value

I have tried If Me!TabCtl159 = Me.Page160 (first tab) Then
'enter date into that record

with no luck

Any ideas would be appreciated as always!

Thanks,

Toni
 
Thanks for the reply My calendar works fine, I just can't get it to drop the selected date into the subform that has the focus-it enters the date on each of the 4 subforms.

Thanks for your time.

Toni
 
I haven't had the problem of getting the date into more than one sub at one time. I've only had the problem not getting any date in any sub date field. have you tried Old Soft Boss's suggestion ?
 
Thanks for the help. I ended up needing to use .ActiveForm to tell the calendar which form I wanted the date dropped in to.

Thanks again,

Toni
 
Query DSum

Looking for some guidance as to which way to go with this.

I have tblProjects
projectid
product (one product can be assigned to many projects)
cutinmonth (1,2,3, etc)
reduction ($)

qryMonthlyEngineVolumes

product
monthid (1,2,3, etc.)
volume

I am trying to create a query that does the following.

Looks at each project, the product, then cutinmonth. Then, go to qryMonthlyEngineVolumes, locate the product and the cutinmonth (monthid) and enter that volume into the correct month. I want to end up with a query that has the following columns:

product
reduction
Jan
Feb
Mar
Apr
May
Jun
Jul
rest of year...

I will then need to take that query's columns and multiply each by the project's "reduction" amount to get a monthly dollar total.


I have tried to use DLookup and create a column for each month but obviously am not doing it correctly because I am getting no data at all then.

Jan: DLookUp("[volume]","qryMonthlyEngineVolumes","[product] = ' " & [tblProjectDetails].[product] & " ' " & " AND [monthid] = " & [tblProjectDetails].[cutinmonthnmbr] & "")

What should I be looking for to figure this out?

Thanks for any help.

Toni
 

Users who are viewing this thread

Back
Top Bottom