Search results

  1. D

    Runtime error 1004 PasteSpecial method of Range class failed.

    Hi, I am trying to copy from one workbook and paste into another workbook but keep encountering a Runtime error 1004 PasteSpecial method of Range class failed. The workbook I am pasting into is protected and I don't have the password to unprotect so not sure if this is causing the error? I am...
  2. D

    Recordset to update a table with sequential numbers based on group of OrderID

    Hi, I am an amateur with Recordsets and looking for some advice. I have a table that lists some order numbers. I need to create a recordset which will add sequential numbering to OrderLnID, 1,2,3,4, etc for each record then reset to 1 each time the order number changes, similar to below table...
  3. D

    Generate restarting autonumber

    I need to design a table or query that can be exported to excel then copied into a write protected upload spreadsheet. The fields in the upload spreadsheet are: Order# Sequence# SKU Qty The sequence number is 1, 2, 3 , etc for each SKU then restarts at each new order #. I can't figure out...
  4. D

    Convert weeks to first day of month

    thanks that worked Isskint!
  5. D

    Convert weeks to first day of month

    Hi I am trying to convert a week which is entered in a text box on a form to the first day of the month in which it falls. My text box (txtdw) is in the format yyww and I want it to be converted to 01/mm/yyyy. example: 1401 would convert to 01/01/2014. 1406 would convert to 01/02/2014. I...
  6. D

    Default value for subform text box

    Compile Error: Method or data member not found
  7. D

    Default value for subform text box

    Hi Guys, I have a mainform and a datahseet subform. Mainform = FrmProj_ProjectEntry Subform = FrmProj_ProjectEntry_Sub1 On my mainform I have a text box (FrmProj_ProjectEntry.txtDueDt) where I enter an expected date. On my subform I also have a textbox (FrmProj_ProjectEntry_Sub1.txtDueDt)...
  8. D

    Combo Box Dependent on Table data

    I've figured this out now :D:D. [PNOSEQ] is the PK in TblPurchaseOrderData.... SELECT TblAddress.PUAddress, TblAddress.VendorCd, TblTblAddress.Active FROM TblAddress WHERE (((TblAddress.VendorCd)=DLookUp("[PNSUPP]","[TblPurchaseOrderData]","[PNOSEQ] = 1")) AND ((TblAddress.Active)=True));
  9. D

    Combo Box Dependent on Table data

    I have an unbound form which I use to enter a parameter for a pass through query. I enter the PO# in a text box and press the command button, the pass through query then appends all records for that PO# to TblPurchaseOrderData. I also have another table - TblAddress where I store all the...
  10. D

    Pass Through Criteria

    The code that i posted earlier (#8) works. Not sure where the ambiguous name error came from but its not happening now. Thanks for your assistance!
  11. D

    Pass Through Criteria

    This is my Pass through query code, however the date needs to be linked to a textbox or combo box on a form. SELECT DATANS.POOMST.PKORDN, DATANS.POOMST.PDORDD FROM DATANS.POOMST WHERE DATANS.POOMST.PDORDD = '20130115' This is my code in the module Public Sub ChangePTStatement(p_QueryName As...
  12. D

    Pass Through Criteria

    I'm getting an error "Compile error: Ambiguous name detected: ~" on ChangePTStatement. Also should my pass through query look like: or:
  13. D

    Pass Through Criteria

    Thanks for your response. I am still trying to get my head around how this works. I have put the first code in a module. Do I change p_QueryName to the name of my pass through query or do i leave it as p_QueryName? Am I still required to have a pass through query or does the query now...
  14. D

    Pass Through Criteria

    I'm hoping someone can help me find a simple solution to this. I have a pass through query in my Access database where currently i have to open the SQL to change my date criteria. SELECT DATANS.POOMST.PKORDN, DATANS.POOMST.PDORDD FROM DATANS.POOMST WHERE DATANS.POOMST.PDORDD = '20130109'...
  15. D

    Add working days to a date

    Hi, I am trying to find a code that will result in the working date 2 days from the current date excluding weekends and holidays which are listed in a table called tblholidays. I'm pretty sure the code below is what i am after but i am just not sure how to incorporate the holidays table into...
  16. D

    Filtering a subform based on another subform

    The two subforms are completely seperate, they have two different record sources. So I probably should have named the examples differently i.e. Mainform1!Subform1 and Mainform2!Subform2 Also both Mainforms are unbound so there is no link between the subforms.
  17. D

    Filtering a subform based on another subform

    Hi, I've searched loads of forums today trying to find a solution to this but am finding myself getting confused and not getting anywhere. I want to be able to double click a record on Mainform1!Subform1 which then opens Mainform2!Subform1 and filters for the record that I double clicked on...
  18. D

    Appending records to table by entering two values

    Only 12 months later but got this one working this morning. I created a new form with unbound fields and a command button with code attached to the command button. Private Sub CmdPassport_No_add_Click() If Me.TxtFirstPassportNo = "" Then MsgBox "You need to enter a starting range for...
  19. D

    Exporting to Excel (Formatting Issues)

    Got it working... Changed j = objexcelapp.WorksheetFunction.CountIf(Columns("B:B"), "Core Fleet") k = objexcelapp.WorksheetFunction.CountIf(Columns("B:B"), "As Required") to j = objexcelapp.WorksheetFunction.CountIf(objexcelsheet.Columns("B:B"), "Core Fleet") k =...
  20. D

    Exporting to Excel (Formatting Issues)

    ok thanks bob, have made those changes. I'm still trying to figure out where i am going wrong though. Thanks for your help.
Back
Top Bottom