Search results

  1. arnelgp

    Move the selected file with acCmdInsertHyperlink

    you can create a function that will Move the file once a Hyperlink has been selected from the screen. copy the code in a Module: Public Function fnMoveHyperLink(ByVal hyperLnk As String, ByVal TargetPath As String) Dim lnk As String Dim fil As String Dim newPath As String Dim...
  2. arnelgp

    Solved problem opening a .csv file in excel - dates all messed up

    you would have said that to ChatGPT:rolleyes:
  3. arnelgp

    Solved problem opening a .csv file in excel - dates all messed up

    IMO, you should first check the "Date To" string and parse the date? strDateTo = (Cdate("theParsedDateTo") & "")=> will give you the string date in English(EN) then compare the resulting string to "theparsedDateTo". if they are the same, re-format the date column as Englisjh(EN), otherwise as...
  4. arnelgp

    40K crashing Long Integer data type

    you need to revise the code that causes the error, eg: Dim Result As long Result = Clng(giCl) * Clng(anyValue)
  5. arnelgp

    Solved Using a query to filter a different query

    you add this code in a Module or on your Form. The code will Remove the Form/Table/Query reference from your filter: ' Copilot Function RemoveWordBeforeDot(sText As String) As String Dim regex As Object Set regex = CreateObject("VBScript.RegExp") With regex .Pattern =...
  6. arnelgp

    Format number with condition

    if you are using a Form and the form is a Single Form, you can set the format on the current event of the form (not tested): Private Sub Form_Current() Dim fmt As String fmt="@" SELECT CASE True CASE [theTextbox] = 0 fmt="-" Case [theTextbox] >=1 Or [theTextbox] <= -1 fmt= "#" Case...
  7. arnelgp

    Solved Select Last Record

    you can also try this code: Private Sub Refresh_Click() With Currentdb.OpenRecordset("SELECT TOP 1 * FROM tbl_MainRecords Order By ID DESC;") If Not .EOF Then OperatorName = !OperatorName Plant = !Plant Recipe = !Recipe End If .Close End With End Sub
  8. arnelgp

    Copy strPath to clipboard

    i found a code that does not require reference to Microsoft Form 2.0 Object. The code comes from: https://stackoverflow.com/questions/14219455/excel-vba-code-to-copy-a-specific-string-to-clipboard/60896244#60896244 Function Clipboard$(Optional s$) Dim v: v = s 'Cast to variant for 64-bit...
  9. arnelgp

    After reassign link to new form in the navigation subform of the navigation button, error message "The form is not exist"

    can you distinguish the difference between the Red frame name and the one on the form design. they are not the same.
  10. arnelgp

    Copy strPath to clipboard

    you should also Change the Font so it will match the Hyperlink font displayed on the Form.
  11. arnelgp

    Copy strPath to clipboard

    You can also use API to put the text from your variable into the Clipboard. Copy/paste in a Module: ' CHATGPT #If VBA7 Then Private Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hwnd As LongPtr) As Long Private Declare PtrSafe Function CloseClipboard Lib "user32" () As...
  12. arnelgp

    Clearing data in a form after clicking print report

    is this what you have in mind?
  13. arnelgp

    After reassign link to new form in the navigation subform of the navigation button, error message "The form is not exist"

    did you check the name of the Form? I don't see same name on the Navigation Panel.
  14. arnelgp

    Using variables as field names

    you do not need bang (!) there. simply: k = rdsR(b)
  15. arnelgp

    Solved Attache files from Subform in main form to Outlook

    change this portion to: .. Do Until .EOF sFile = sPath & .Fields("FileName") ' Construct full file path If sPath <> sFile Then i = i + 1 ' Increment counter for collection key...
  16. arnelgp

    Solved Attache files from Subform in main form to Outlook

    If the subform has Link Master/Child Fields, it will work. you have a Collection Object there (that contains the Path+filename), use it on your code to as Attachment: .. For i = 1 To colAttach.Count objMail.Attachments.Add colAttach(i & "") Next
  17. arnelgp

    Solved Attache files from Subform in main form to Outlook

    you can test this: Private Sub AttachToCollection() Dim rsAttach As DAO.Recordset2 Dim sPath As String Dim sFile As String Dim i As Integer Dim bm As Variant bm = Null sPath = Environ$("Temp") & "\" Set colAttach = New Collection With...
  18. arnelgp

    DSum() formula field on Form shows #Error as Form open with no record entry

    you can use: =DSum("TotalCost","PurchaseDetails","[PurchaseID] =" & Nz([PurchaseID], 0))
  19. arnelgp

    Subform records shake if the number of records is large

    11 is the barcode, "العاب 1000" is the IName. you see table tabl1.
  20. arnelgp

    Subform records shake if the number of records is large

    i think you can have Arabic captions, but not arabic control name.
Back
Top Bottom