Search results

  1. S

    Query Future Dates Only

    When i try SELECT tblTrips.TripID, tblTrips.TripDestination, tblTrips.TripReferenceNumber, tblTrips.DateOfDeparture, tblTrips.DateOfReturn FROM tblTrips WHERE (((tblTrips.DateOfDeparture)="IS NOT NULL") AND (((tblTrips.DateOfDeparture)>Date())) AND...
  2. S

    Query Future Dates Only

    cheers man... i can't use the criteria box etc as it only does OR's.... i can't get the brackets right, can anyone tell em what i'm doing wrong...: SELECT tblTrips.TripID, tblTrips.TripDestination, tblTrips.TripReferenceNumber, tblTrips.DateOfDeparture, tblTrips.DateOfReturn FROM tblTrips...
  3. S

    Query Future Dates Only

    Help with combobox query to only show trips > Date() Hi guys In a combo box in my db you can select a trip from it, but i want it to only show trips where date of departure is greater than todays date... but also it needs to only be filled ONLY IF the fhe field DateOfDeparture is NOT NULL -...
  4. S

    Treating Dates With Wildcards

    instead of learning access, perhaps i should learn to read :rolleyes: thanks again man, you're helping me when you're not even here - magic!
  5. S

    Treating Dates With Wildcards

    I've got this code: '************************************* 'SrchDateOfDeparture Date Field Code * '************************************* If Left(Me![SrchDateOfDeparture], 1) = "*" Or Right(Me![SrchDateOfDeparture], 1) = "*" Then where = where & " AND [DateOfDeparture] like '" +...
  6. S

    Treating Dates With Wildcards

    Problem: works with wildcards but not with FULL dates. To work with full dates (ie you know the exact date you want) you have to use the # delimeter. Is there any way around having to have seperate fields for 'exact' date and for one with a wildcard in it? i am quite keen not to have double the...
  7. S

    Treating Dates With Wildcards

    yeah man i was trying that before, but i get compile errors when i do that? the way i did it seems to work ok? have a quick test of it remember that SrchDateOfDeparture is the unbound field in the search form (this is a query by form method) and DateOfDeparture is the actual table/query field...
  8. S

    Treating Dates With Wildcards

    yesssss! thanks mailman! what i had to do was use single quotes - i tried using double quotes and hash (as above) but if it's a string then surely u need single quotes? anyway it works :D code is simple:'************************************* 'SrchDateOfDeparture Date Field Code *...
  9. S

    Treating Dates With Wildcards

    bah, maybe i should go home. i managed to get a wildcard working on a normal text field: If Left(Me![SrchTripDestination], 1) = "*" Or Right(Me![SrchTripDestination], 1) = "*" Then where = where & " AND [TripDestination] like '" + Me![SrchTripDestination] + "'" Else where = where & "...
  10. S

    Treating Dates With Wildcards

    but that's what i've already got (modified to work with query by form method)? and it doesn't work? like i say my code is: If Not IsNull(Me![SrchDateOfDeparture]) Then where = where & " AND [DateOfDeparture]= #" & Format(Me![SrchDateOfDeparture], "mm/dd/yyyy") & "#" End If...
  11. S

    Treating Dates With Wildcards

    sorry i don't understand... are you saying if i simply add a dollar sign in there i can use wildcards? I tried that and it didn't work... i am already doing what you suggested man (see my original post).... am i beign amazingly dim again? Cheers
  12. S

    Treating Dates With Wildcards

    How can i modify this date field code to accept wildcards? Hi guys. I'm using the query by form method, and am searching for dates. Here's the code i have at the moment which searches for exact dates only (this works fine): If Not IsNull(Me![SrchDateOfDeparture]) Then where = where &...
  13. S

    Count Function

    yeah the gif is just a screen shot - nothing saucy (unfortunately!)!! :D
  14. S

    Count Function

    for people who need help in the future and search and get this post... here's the code i used in the end... SELECT [Dynamic_Query_Trip3 Query].TripID, [Dynamic_Query_Trip3 Query].TripType, [Dynamic_Query_Trip3 Query].TripDestination, [Dynamic_Query_Trip3 Query].DateOfDeparture...
  15. S

    Count Function

    do you want to know what my vision of beauty is? check the gif below! thanks SO MUCH for your help man, i really appreciate it!
  16. S

    Count Function

    hi thanks for a quick reply! my problem is that i don't understand the bit in bold SELECT Query1.Trip, Query1.Date, Count(Query1.Trip) AS NoPeople FROM Query1 GROUP BY Query1.Trip, Query1.Date; I don't really understand the count() function? Do i need a field called count? Or NoPeople? I'm a...
  17. S

    Count Function

    so in this example, 2 people went on the 'lifestyle' barcelona trip, and 6 people went on the 'prestige' one - so in another column i need it to say NoOfCustomer 2 and 6 (respectively for each trip) I've got a NoOfCustomers field in the trip table but currently don't know if it's needed...
  18. S

    Count Function

    hi there man. i think you are understanding it great, but just to make sure i added a picture of the forms. what happens is this... you go to a trip search form and say i want all trip to barcelona. it searches a query for all records where there is a customer going on the trip, and the...
  19. S

    Count Function

    hi - thanks for your reply this is what i'm doing already! what i don't know how to do is count the number of records for each trip and display them. does anyone have any idea how this could be achieved?
  20. S

    Count Function

    Can't get my head around this difficult record count problem Hi guys Trying to simplify... basically i have a listbox which which displays a load of trips (from a dynamic query... the user may have just searched for all trips to barcelona, and so all the past trips to barcelona have come up in...
Back
Top Bottom