Search results

  1. D

    dsum calculated criteria

    Hi, Just want to get some clarification on whether or not it is possible to have a calculated criteria in the DSum function. I have the following expression as my control source in a textbox. Textbox returns nothing. If it is possible, can anyone see where i am going wrong...
  2. D

    iif statement as criteria on sub report

    ok i'm totally confused now... lol. I've attached my DB. Thanks.
  3. D

    iif statement as criteria on sub report

    This is what i have when i don't format the date field in the query. SELECT TblFuelLevy.CMSRef, TblFuelLevy.Site, TblFuelLevy.FLdate, TblFuelLevy.FLType, TblFuelLevy.FLRate, TblFuelLevy.BaseRate, TblFuelLevy.ActualRate, TblFuelLevy.CostVariance, TblFuelLevy.CostVariancePer...
  4. D

    iif statement as criteria on sub report

    If i set the format as DD/MM/YYYY it does not return any results because the criteria from VBA is asking for MM/DD/YYYY. The data that exists in the table is in DD/MM/YYYY format so wouldn't have to chang format to MM/DD/YYYY? yeah, i knew you could change expr1 to something else, so say i...
  5. D

    iif statement as criteria on sub report

    I go tthe metro part to work. but i'm having trouble the date format. I've entered the date format into the designview of the query and i get: Expr1: Format([FLDate],"mm/dd/yyyy") this gets me the rigth results, however if i go out and run the report again from the form it asks for a...
  6. D

    iif statement as criteria on sub report

    I realised i made a typo in my post. Should've read: So i have changed the dateadd funtions to -2 rather then 2. After doing this i have two problems. 1. the date that ends up being the criteria in the query is in US format MM/DD/YYYY. I need it to be DD/MM/YYYY. I've changed the SQL...
  7. D

    iif statement as criteria on sub report

    A little help please.:confused: I have a form where i select a contract number(cbocmsref and a month(cbofldate). Once selected i hit a button and my report opens. i want the main repor tot be as per cbocmdref (i got this part working) and the sub report criteria to be as per the cbofldate on...
  8. D

    Edit existing record

    Many thanks.
  9. D

    Edit existing record

    Thanks for your responses. VBAInet - Yes I want the user to be able to change the date fields, the reminder date is the date they want to be reminded that the task is close to being due. The due date is the date that they want the task to be due. Gemma - I don't have a field called date...
  10. D

    date less then another date

    I'm trying to do a dcount if my date field is on or before today. The date in [reminderdate] is 01/07/10. So i'm not sure why it isn't counting it. if i change the date to 01/07/09 it works. i'm thing it is counting the date as a number? do i need to declare [reminderdate] as a date? If...
  11. D

    Edit existing record

    1. i wanted to have the date and time in seperate fields but now have realised i can just use the saem field and format it differently depending on the report i use it in. 2. no not locked 3. yes they are bound.
  12. D

    Edit existing record

    I don't know what i was thinking... i didn't even need an update statement. You know sometimes when you think to hard about something you easily overlook the simple solutions. I ended up just using an if statement. Private Sub Completed_Click() If Me.Completed = -1 Then...
  13. D

    Edit existing record

    Hi, I'm trying to edit an existing record in a table with a date/time stamp once i check my check box on my form. I've been reading tonnes of threads trying to figure out where i'm gonig wrong but i'm yet to have any luck :mad:. I think i'm prettyclose though. Can anyone help? Dim TaskHistory...
  14. D

    cascading combo box on subform

    As always thanks vbaInet and also to you too GalaxiomAtHome. That does the job for me. I just had to remove the apostrophes on the second condition to get it to work. Cheers
  15. D

    cascading combo box on subform

    My SQL does not necessarily need to contain an IIf statement, i just want there to be two conditions in the combo box 1. if mainform combobox = NAT then subform combo box shows all records 2. if mainform combobox <>NAT (i.e. NSW, VIC) then subform combo box should show only sites within the...
  16. D

    cascading combo box on subform

    Hi, I'm trying to do a cascading combo box from my main form onto my subform with the criteria as an iif statement. If mainform combo box = "NAT" then i want all records to be avaialble in subform combo box. If main form combo box = anything but "NAT" then i want it to limit the records by...
  17. D

    combo box date range

    Thanks John, I ended up finding something i can use on another site. It wasn't what i originally wanted but it will do. Private Sub Cbocontract_AfterUpdate() Me.CboMth1.RowSourceType = "Value list" M1 = Format(DateAdd("m", -5, Date), "MMMYY") M2 = Format(DateAdd("m", -4, Date), "MMMYY") M3 =...
  18. D

    combo box date range

    Hi i'm trying to design a combo box to be used as a date picker. On one form i have contract details with a contract start date(TxtBox1) and a contract finished date (TxtBox2). On a second form i select the contract # from a combo box 1 (CboContract) then in combo box 2 (CboMonth) i want to...
  19. D

    week before end of month excluding public holidays and weekends

    cool.. i've done that now. A new issue now though. I am now trying to to run an if statement in another function referencing back to WeekBeforeEOM() such as If Date = WeekBeforeEOM() Then MyMail.Subject = "Week Before End of Month Email - " & [CurrentMth]...
Back
Top Bottom