Search results

  1. 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 =...
  2. 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...
  3. 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
  4. 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...
  5. 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.
  6. arnelgp

    Copy strPath to clipboard

    you should also Change the Font so it will match the Hyperlink font displayed on the Form.
  7. 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...
  8. arnelgp

    Clearing data in a form after clicking print report

    is this what you have in mind?
  9. 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.
  10. arnelgp

    Using variables as field names

    you do not need bang (!) there. simply: k = rdsR(b)
  11. 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...
  12. 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
  13. 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...
  14. 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))
  15. arnelgp

    Subform records shake if the number of records is large

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

    Subform records shake if the number of records is large

    i think you can have Arabic captions, but not arabic control name.
  17. arnelgp

    Subform records shake if the number of records is large

    oooppps, i attached the non-working db on post#21.
  18. arnelgp

    Subform records shake if the number of records is large

    rename all arabic control names to english. save the form. create new db and import all objects from the old db.
  19. arnelgp

    Subform records shake if the number of records is large

    it is has much flickering because the previous code, the cursor is going to new record, therefore access when refresh the form will flicker. the new code is adding through recordsetclone, but do not go to that record (you can go to the new record ofcourse by setting the form's...
  20. arnelgp

    Subform records shake if the number of records is large

    the "shaking" is minimized (except some twerking).
Back
Top Bottom