Search results

  1. S

    Security Concern

    Address is the file path. If you change that Access can't find the file. Change 'text to display' to whatever you like. The security warning is because Access is a bit thick and can't work out that it's a trusted folder from a relative rather than absolute path.
  2. S

    Automate form aspect

    You can display the description and highest batch in the same list if you add another column. With the Batch column as the Bound column the list displays the description while providing the batch ID. edit: Combo rowsource = select top 1 batch, numbertype from Batching where numbertype='cash'...
  3. S

    Coninuous Form not Scrolling since Windows Update

    The Mouse Wheel behavior changed from 2007... https://support.microsoft.com/en-gb/help/2458709/you-cannot-use-the-mouse-wheel-to-scroll-through-records-in-an-access ...but this sounds like the scroll wheel isn't working at all on some Windows 10 PC's. Is the form/s in a container form...
  4. S

    Insert

    Filter applies to a recordset opened from that recordset Private Sub cmdIn_Click() On Error GoTo cmdIn_Click_Error Me.RecordsetClone.Filter = "[Updated] = -1" Test Me.RecordsetClone.openrecordset Exit Sub cmdIn_Click_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ")...
  5. S

    LoopWithout Do Error- Plz help

    Your End If's appear to be off. Private Sub flibble() With rs Do If DLookup("ReportCat", "TestName", "TestNameID= " & strTestName & " ") = 22 Then End If If DLookup("NonValue", "TestName", " TestNameID =" & strTestName & "") =...
  6. S

    Append Function Return Value To Table

    Well yeah I got that. But ReturnValue is not defined. Value is an array. But why are you adding items to an array ifyou are putting them in a table? You just need to store the value. Dim HcLoop As Integer dim myvalue as ??? '< function return type For HcLoop = 0 to 100 myvalue =...
  7. S

    Resizing stacked controls

    "I did this thing but looks weird" doesn't explain what you did or why/how it looks weird. Please upload some example images / code / database. Ta.
  8. S

    Append Function Return Value To Table

    Your code doesn't make any sense, but anyway currentdb.execute "insert into ATable (ANumberField) values (" & TheValue & ")"
  9. S

    No Microsoft Office XX.0 Object Library in Access 2016

    Check C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICEXX\MSO.DLL In Access you can query references with this, (not sure if it'll work in Excel)... Dim r As Reference For Each r In References Debug.Print r.Name, r.FullPath Next I'm on 2010... edit: You only need the...
  10. S

    Is it possible to do "Window Actions" through Code?

    As far as I recall you can open File Explorer to a certain directory, but I'm not sure you can do much else with it and since nothing the user selected would pass back to the VBA code it's kinda useless from a programming point of view. You can build your own file browser in a form. You can use...
  11. S

    Is it possible to do "Window Actions" through Code?

    For what purpose?
  12. S

    Automated Alert/Message Box

    Create 2 tables Messages MsgID = autonumber primary key Msg = text ReadMessages MsgID = long number User = text Private Sub Form_Open(Cancel As Integer) 'start timer when form opens 'check for new messages every 10 seconds TimerInterval = 1000 * 10 '10 secs End Sub Private Sub...
  13. S

    Mouse Wheel Scroll through records not working

    You could hold a key while scrolling. CTRL scrolls one record, Shift scrolls the Windows setting, no CTRL or Shift works as normal. Dim ctlkey As Boolean Dim shftkey As Boolean Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) ctlkey = KeyCode = 17 shftkey = KeyCode = 16...
  14. S

    Mouse Wheel Scroll through records not working

    Count is the number of lines to scroll from settings. So... Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long) On Error GoTo eHndl For i = 1 To Abs(Count) DoCmd.GoToRecord , , IIf(Count > 0, acNext, acPrevious) Next eHndl: Err.Clear End Sub
  15. S

    Code works when stepping but not when running

    If you've upgraded the back-end, you need a different connection string for accdb than you used for mdb. https://www.connectionstrings.com/access/ Why are you using ADO instead of DAO anyway?
  16. S

    Password validation

    Using Like on string allows wildcards Private Function PWOk(pw As String) As Boolean On Error Resume Next If Len(pw) < 8 Then Err.Raise vbObjectError, , "not long enough" If Not pw Like "[A-Z]*" Then Err.Raise vbObjectError, , "first char must be upper" If Not pw Like "*#*" Then...
  17. S

    Query syntax in VBA headbanger

    I don't think you need a WHERE and a HAVING. If you group records you use HAVING. Remove the WHERE. This line doesn't make sense. "HAVING (Tbl_Trial.EmpName)>"";" > is usually used with numbers not text. I guess you want <>. Also if you use double quotes in a string you need to double them...
  18. S

    Question want to replace "/" with "" in a table "Master"

    Add this to a standard module Public Function replaceX(s1 As String,s2 as string,s3 as string) As String replaceX = Replace(s1, s2, s3) End Function Change .Execute "update master set [" & f.Name & "]=replace([" & f.Name & "],'/','')" to .Execute "update master set [" & f.Name &...
  19. S

    Question want to replace "/" with "" in a table "Master"

    With CurrentDb Dim f As DAO.Field, t As DAO.TableDef Set t = .TableDefs("master") For Each f In t.Fields Select Case f.Type Case 10, 12 .Execute "update master set [" & f.Name & "]=replace([" & f.Name & "],'/','')" End Select Next End With
  20. S

    Loop to detect when .ldb closed within a time limit

    Obviously if the file is large and you have a slow network it will make some difference because there is more file to copy over the network, but that's it. The file will have doubled in size for a reason. You'd be better off working out why and fixing that issue. You've added a lot of data to...
Back
Top Bottom