Thanks Mate it works
However can't we have it on the Print Button
I have uploaded it the Db3
and I also have the problem of the date
I want to have a list or a combo box that passes the value of the Month such as Dec or Mar.... into the Print Preview Button so I can print the whole month...
the list should have the values
Mar
Dec
.... etc
you slect the value (Dec) then the value get passed to print Preview Button
the report will display all the records of ( dec)
however how do you extract Dec from 01-Dec-10
because the date filed stores the value 01-Dec-10
and how do you pass...
I have a date field that and the format of the Field is in
05-Dec-10
I want to write the query that will give all the records between 01-May-10 and 31-May-10 I can do that in normal query
I have I wan to do it via a print button
What I mean is have a List with the Months ( May, Dec...
I can Lock the Record in the Subform using this
Private Sub Form_Current()
If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
End Sub
However I wan ti tto run from the Print Button
These are the name of the fields
EMP_No
Task Code
Date_Task
OverTime
start date
end date
Task Desc
=(DateDiff("n",[start date],[end date]))\60 & Format((DateDiff("n",[start date],[end Date])) Mod 60,"\:00")
=(DateDiff("n",[start date],[end date])/60)*Forms!Employee!rate
I tried your code but...
Private Sub rptTime_Click()
On Error GoTo Err_rptTime_Click
stDocName = "Employee2"
DoCmd.OpenReport stDocName, acPreview
Exit_rptTime_Click:
Exit Sub
Err_rptTime_Click:
MsgBox Err.Description
Resume Exit_rptTime_Click
End Sub
and on the Oncurrrent Subform I had...
Sorry I meant when they click the Print Button they get the subform Locked for the current recordds
However they can make an entry for a new record and edit but when they re click the Print preview button again they new records that got entered will be locked
so what I mean everytime you...
Hi All
I have a main form( Employee)and subform( EMP_Task) it is a one to many relationship
On the main form I have a print Preview button
I want to have a code in the Print Preview Button to lock the SubForm( Emp Task) when clicking the Buttton
but i still want the user to have the ability...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.