Trying to create search form

Leah

Registered User.
Local time
Today, 21:30
Joined
Jun 5, 2003
Messages
11
Hi there,

I am a newbie to VB, so there may a simple answer to this... But I will try and explain as well as I can..

I have a table called 'overtime' which I have put as a subform on a tab form after my 'employees' form, so each employee has a form with their employment details and a tab with their overtime.
I have the following fields on my 'overtime' form:

Overtime date
Overtime start time
Overtime end time
Total hours (which is an equation within itself to find the total hours between the start and end times)

I have created a total on the footer of the subform to calculate how many overtime hours have been taken by the employee overall (ie. all the records).

I am trying to create a search where I can enter my parameter dates and it will bring up a query with all the records of overtime for that one employee within those date parameters.
I seem to be having some troubles working out how to do this to work within the subform and also to only bring up the one specific employee only.

Please help!

Thanks!:confused:

Leah
 
Leah

Hi!!!


Attached for your use is a sample DB that may be what you are looking for.

You may need to modify it to suit your applicantion.


Cheers!!!!!


Lou:cool:
 

Attachments

Leah

This is a seecond sample

Cheers!!!!



Lou:cool:
 

Attachments

Couple of good examples Beef.

I prefer the dynamic SQL method. (Can hit the SQL string length limit with the second method.)

I would make one very slight alteration to your "Subject" criteria, in order to include a keyword, instead of only the starting word of the subject.

ie: Change from:

Code:
If Me![Subject] <> "" Then
            sCriteria = sCriteria & " AND qrySearchCriteriaSub.Subject like """ & Subject & "*"""
        End If

to:

Code:
If Me![Subject] <> "" Then
            sCriteria = sCriteria & " AND qrySearchCriteriaSub.Subject like ""[COLOR=red]*[/COLOR]" & Subject & "*"""
        End If

But that's being picky :)

Cheers

Brad.
 
Brad

Thanks for your input.

I do not see it as being picky but more as continuous improvement.

Once again down under strenght


Cheers!!!!



Lou
 
because we are all 3 of use are from Australia

Cheers!!!!!


Lou
 
No, Sorry Beef.

By "Why beef?", I meant:

Why the name "beef"?

Sorry, my fault, I should say what I mean. :)


It is good to see a few more Aussie's on this forum though.

Cheers

Brad.
 
Brad


Sorry I misunderstood. The reason for beef is that ffor the past 10 years I have been involved in beef carcass competitions through a country town in Vic called Lang Lang. I wrote a database using vba to record competition details. That why beef.


Cheers!!!!


Lou
 
Thanks everyone for your help!

I'll give it a go over the next few days...


Cheers,

Leah
 

Users who are viewing this thread

Back
Top Bottom