Hi Mike
I think I got a solution similar to what you are after on here a few weeks ago.
Look at this thread: http://www.access-programmers.co.uk/forums/showthread.php?t=266188
The code was specific to my db so will need adapting but there is a sample database there to look at.
If...
Hi vbaInet
I hoped you would see this one.
Aside from the where condition the query simply shows each individual date that has the activity 'Holiday'. I just need to be able to calculate the datediff between my start date and the last holiday start date.
So the form will let you...
Oops should have removed that Where condition!!
WHERE (((Resourcing.Start_Date) Between DateSerial(Year(Date())-IIf(Month(Date())<4,1,0),4,1) And DateSerial(Year(Date())+IIf(Month(Date())>3,1,0),3,31)) AND ((Resourcing.Activity) Like "Holiday*")
Even thinking of the title for this question was difficult for me. When it comes to code I'm a rank amateur. Just ask vbaInet:D
Here's what I would like to do:
I have a data entry form [Resources] and I would like to display some information about holidays in the form footer. Once the user...
So I created a new form. Referenced it in your code and it worked. strCondition was matching the records and I didn't need to change anything. But you knew that.:D
Hi vbaInet
Was thinking about your last comment. The form 'Edit_Hours is a main form not a subform (although I have used it as a subform elsewhere) so I should be able to filter it.
I tried DoCmd.OpenForm "Edit Hours", , , "Trainer_Name =" & Cmb_Trainer_Name.ValueBut it tells me that I am...
She'd kill me for making too much noise and 'playing with that stupid database'
I was just wondering about that. If I opened it as a form I could use Do.Cmd to filter on the trainer_Name and even the Start_Date couldn't I?
I'll look in to functionx. I can write some very basic instruction as...
It works, it works, it works.
I would dance around the room but I'm shattered. What's better every combination of AM, PM and all day seems to work. I thought I had more code to do. I'm delighted.
Thank you for your time and patience beyond what is reasonable to expect.
Obviously I...
In the VBA window I double clicked the form 'Resourcing' which then showed all the code attached to the resourcing form. I pated the function as the last entry
Ok the field is actualy listed as cmb_Trainer_Name and the text label is Trainer_Name_Label.
I tried typing me. and waiting for it to prompt me with a list but it didn't it just waited for my input. I tried changing the code to strTrainer = "[cmb_Trainer_Name] = '" &...
Ok. Done that. I'm still getting a compile error on strTrainer = "[Trainer_Name] = '" & Me.Trainer_Name & "'" and it has allowed me to double book a trainer.
I may have to consider reverting to something like graph paper and coloured pens:banghead:
Only kidding. I've just learned how...
Public Function DuplicatesCheck() As Boolean
Dim intCheck As Integer
Dim strDates As String
Dim strDuration As String
Dim strTrainer As String
Dim strCondition As String
Dim strMessage As String
Dim intResponse As Byte...