Search results

  1. 5

    Solved Need to rename a file after copy to another folder

    I tried: Dim objHTTP As Object Dim FileByte() As Byte Dim strFile As String Dim intFile As Integer Dim URL As String URL = Forms!frmWIDetails!txtDoc.Value intFile = Forms!frmWIDetails!txtDoc.Value() strFile = Mid(URL, InStrRev(URL, "/") + 1) Set objHTTP = CreateObject("Microsoft.XMLHTTP")...
  2. 5

    Solved Need to rename a file after copy to another folder

    Works great, thanks! One more question, To add to above code, I also want to add another file from sharepoint to that same folder. My tables are imported from sharepoint so I already have URL stored in tables!WordDocs!Name as hyperlink and there are also "Path", "URL Path" and "Encoded...
  3. 5

    Solved Need to rename a file after copy to another folder

    Hi, Yes, the value would look like: M:\429 QMO\Document Reviews\Doc Review Package\DND 4719-E WI Review Checklist.pdf
  4. 5

    Solved Need to rename a file after copy to another folder

    Hello all So far I have this code: Private Sub btnGenerate_Click() Const strParent = "M:\429 QMO\Document Reviews\Document Reviews\" Dim strSerial As String Dim strSFolder As String Dim strFolder As String Dim fso As Object Dim FDate As String Dim Path As String...
  5. 5

    Solved DoCmd.OpenForm with where condition does not filter as expected.

    Here's what I did: Private Sub btnNewDR_Click() Dim DocID As Long DocID = Form!frmDocReview!fldDocID DoCmd.OpenForm "frmdocrevdetail", , , , acFormAdd, , OpenArgs:=DocID End Sub I know it works because I tested with msgbox. DocID gets the correct number. Here's the error I get...
  6. 5

    Solved DoCmd.OpenForm with where condition does not filter as expected.

    Should mention: When I try to save the record on an opened form, it says "You cannot add or change a record because a related record is required in table "tblWIUnion"
  7. 5

    Solved DoCmd.OpenForm with where condition does not filter as expected.

    Private Sub btnNewDR_Click() DoCmd.OpenForm "frmdocrevdetail", , , "fldDocID =" & me.fldDocID, acFormAdd End Sub My main form is "frmWIDetail" In it, I have a sub-form "frmDocReview" Also on the main form I have a button "btnNewDR" My plan is to keep a record of reviews (Sub-form...
  8. 5

    Trying to filter date with textbox input

    Hey everyone. Just like to report that it works using this line.
  9. 5

    Trying to filter date with textbox input

    Can someone explain why this doesn't work? Private Sub btnFilterDate_Click() Dim DueDate As Date DueDate = DateAdd("d", Me.tbxFilter.Value, Now()) Me.Filter = "ReviewDue <= duedate" Me.FilterOn = True End Sub I want to filter ReviewDue by today + what ever number is in tbxfilter.
  10. 5

    Set textbox to be a multiple criteria calculated field, for current recordset.

    Great! Thanks. Now, here's what I've got so far: Private Sub Form_Load() Dim DueDate As String DueDate = DateAdd("yyyy", 1, DMax("[fldauditdate]", "tblwiaudit", "fldaudittypeid= 3 And fldDocID = " & Me!fldDocID)) Me.fldDocReviewDate.Value = DueDate End Sub
  11. 5

    Set textbox to be a multiple criteria calculated field, for current recordset.

    Good day everyone I have a textbox "fldDocReviewDate" First variable is subform "subfrmWIAudit" field "fldAuditTypeID" Second variable is subform "subfrmWIAudit" field "fldAuditDate" Third variable is +365 days I want my textbox "fldDocReviewDate" to do this: 1. Locate the latest record in...
  12. 5

    Solved My code inserts two identical records instead of one

    Oh man, yes. That the problem. Thank you!
  13. 5

    Solved My code inserts two identical records instead of one

    When I click on OK button, it's supposed to add a record in my table based on the text boxes typed. It works, but it makes two entries instead of just one. Here's the code: Private Sub cmdOk_Click() Dim Fail As Boolean: Fail = False ' Check to ensure the pertinate data has been...
  14. 5

    Error 3075 Syntax error in query expression

    Thank you, unfortunately I still get the error. However, I've changed the code a bit. It is now Private Sub lstProcess_AfterUpdate() On Error GoTo ErrorCfg Select Case lstProcess.Value ' All Case 0 Me.FilterOn = False ' 4.1...
  15. 5

    Error 3075 Syntax error in query expression

    Am I missing, or have I misplaced characters? Private Sub lstProcess_AfterUpdate() On Error GoTo ErrorCfg Select Case lstProcess.Value ' All Case 0 Me.FilterOn = False ' 4.1 Case 1 Me.Filter = "fldDocID = " &...
  16. 5

    Solved Browsing for file code issues

    Yep, found it! Thanks!
  17. 5

    Solved Browsing for file code issues

    That makes sense. I'm looking trough this inherited code to see if it's defined somewhere else.
  18. 5

    Solved Browsing for file code issues

    Hello, Is there something obvious why my code below does not work? Private Sub btnBrowse_Click() ' File targets Dim sourceFile, targetFile, target As String ' Error Location On Error GoTo Error_btnBrowse_Click ' Check to see if its an add or remove If...
  19. 5

    Solved Runtime error 3022, Why?

    Hello, Thanks for you reply. I'm thinking I have an issue with Now, I'm just copying code from another database and changing the values to work with this database, so I'm not 100% sure, however, If I'm reading this correctly, fldAuditID becomes what ever the fldDocID is on the form. This...
  20. 5

    Solved Runtime error 3022, Why?

    Hello once again! I am trying to add data from unbound text boxes to a sub-form but I get runtime 3022. Maybe you guys know why? Can you see anything wrong with the code below? Next, here is the sub-form SQL Main form Red box contains my unbound text which by pressing "Enter Audit into...
Back
Top Bottom