Search results

  1. D

    week before end of month excluding public holidays and weekends

    Thanks very much for your help... Here's the working code that i finished up with. Public Function WeekBeforeEOM() As Date Dim SendDate As Date SendDate = DateSerial(Year(Date), Month(Date) + 1, -7) Do While Weekday(SendDate, vbSunday) = 1 Or Weekday(SendDate, vbSunday) = 7 SendDate =...
  2. D

    week before end of month excluding public holidays and weekends

    I think i've done what you suggested? BUt i'm getting an overflow error and the SendDate is showing as 01/01/100 when i move the cursor over it. Public Function WeekBeforeEOM() As Date Dim LastWorkday As Date Dim SendDate As Date LastWorkday = DateSerial(Year(Date), Month(Date) + 1, 0)...
  3. D

    week before end of month excluding public holidays and weekends

    Hi, I'm trying to write a code to caluclate the working day a week before the end of the month. I've found similar codes from various places on the net and tried to use them where i can but no luck. If the date is 7 days before end of month and its a weekend or a public holiday then i want it...
  4. D

    first and last day of months

    Worked great thanks!
  5. D

    first and last day of months

    On my form I have a month Combo Box and a Year combo box. Below that I have two text boxes - Start Date & Finish Date. When i select the month and year i want the start date to be populated with the first day of the select month/year and the finish date to be populated with the last day of the...
  6. D

    Runtime Error 424: Object Required

    That worked great! thanks again for all your help!!
  7. D

    Runtime Error 424: Object Required

    Do I put an AND after or before "[terminated]<>-1"?
  8. D

    Runtime Error 424: Object Required

    No errors! I changed the event. to on Load ratehr then On open and it worked. Thanks for all your help vbaInet! Next problem is that it counts all of the contracts not just the contracts for the main form vendor.
  9. D

    Runtime Error 424: Object Required

    Now i'm getting a new error. I think i fixed the first one with the code below because when i debug on the second error if i hove my cursor over the sapvendor and carrier i get the right values. TxtActiveContracts = IIf(Me.txtSAPVendor = Me.Related_Contracts.Form!Carrier...
  10. D

    Runtime Error 424: Object Required

    This is sending me insane! :eek: I've had a look at the link and still can't get it to work. This is what i've got, but i keep gettign an error saying that access can't find the field. TxtActiveContracts = IIf(Me!txtSAPVendor = Me!FrmrelatedContractsSub.Form!Carrier...
  11. D

    Runtime Error 424: Object Required

    Don't really want to post the DB because it contains sensitive information.
  12. D

    Runtime Error 424: Object Required

    Not yet. TxtActiveContracts = IIf(Me![Carrier] = txtSAPVendor, DCount("[terminated]", "tblcontract", "[terminated]<>-1"), "") Tried this and now I get an error message txtsapvendor is in the main form and carrier is in the subform i thought it should've been TxtActiveContracts =...
  13. D

    Appending records to table by entering two values

    We issue out books that have sequential id number to different parts of the business and we want to keep track of which books are issued where. I may issue 10 books to one business at a time and rather then logging each books id number and details individually i want to be able to log all 10...
  14. D

    Appending records to table by entering two values

    Hi i'm in the process of creating a form where I want to be able to enter two values then press a command button and it will append the the values and all values in between to a table. The values are the primary key e.g. If i enter 1 and 5 on the form i want to append 1, 2, 3 , 4 & 5 to the...
  15. D

    Runtime Error 424: Object Required

    1. Carrier is a field in the subform's record source. 2. tblContract is a table in the subform's record source 3. txtSAPVendor & txtActiveContracts are textbox controls on the main form.
  16. D

    Runtime Error 424: Object Required

    Its on the On Open event of the main form. I've replaced the null with "" and still get the same error.
  17. D

    Runtime Error 424: Object Required

    Hi I'm trying to count the number of records in a subform if a value in the subform matches a value in my main form. TxtActiveContracts = IIf(tblcontract.Carrier = txtSAPVendor, DCount("[terminated]", "tblcontract", "[terminated]<>-1"), Null) Thanks
  18. D

    Text Boxes dependant on Combo boxes

    column count fixed it... I should've known that! thanks guys
  19. D

    Text Boxes dependant on Combo boxes

    I'm trying to get to three text boxes on my form to be dependant on a combo box. I can get TxtPop to work but not the other two. I thought i had done this before and had problems. but i'm not sure why its not working this time. If i change the columns for TxtProdcd & TxtDescription to...
  20. D

    Crosstab query.... I think

    Thanks guys, the switch function worked great!
Back
Top Bottom