Recent content by omnibaer

  1. O

    I'm New to this Community

    Welcome! I'm new to the site also, but there's a wealth of knowledge here.
  2. O

    Short form Date format problem

    Good point @spikepl, I guess the format statement should be Format(date, "mm/dd/yyyy"). This will give you a string in the format that SQL expects, regardless of your system settings. Cheers.
  3. O

    Allocate a record to a place in a table

    Great tutorial, very detailed. My notes from the code I posted: - The RS.Recordcount check is important to ensure the recordset opened properly and that there are actually results to search through. - The RS.NoMatch check gives you the return from the RS.FindFirst call. If there is a match...
  4. O

    Allocate a record to a place in a table

    Well, that sounds like an adventure. Have you ever used DAO Recordsets before? For example: Dim RS As DAO.Recordset Set RS = CurrentDb.OpenRecordset("SELECT * FROM Devices", dbOpenDynaset, dbSeeChanges) If RS.Recordcount > 0 Then RS.FindFirst "ID = " + <whatever ID you want> If RS.NoMatch Then...
  5. O

    Edit specific field records only

    Private Sub Form_Current() On Error Resume Next Me!Map.Locked = (Nz(Me!Map, "") <> "") Me!Locations.Locked = (Nz(Me!Locations, "") <> "") End Sub Always make sure you validate your fields when using them in functions (what Nz is for), or null errors may result. Cheers
  6. O

    Short form Date format problem

    Easy, and always a good thing to validate. I learned over the years that you can't count on regional settings, so always validate your date formatting. Private Sub dob_BeforeUpdate(Cancel As Integer) On Error Resume Next If DCount("*", "maintable", "[dob]=#" & Me.dob & "#") > 0 Then MsgBox...
  7. O

    Opening URL from VBA

    I realize this is a veeeerrrry old post now, but here's an "easy" solution to this: Private Const SW_SHOWNORMAL = 1 #If VBA7 Then Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias...
  8. O

    Dynamic Ribbon & Runtime Errors

    This is a great implementation of pointer restoration, but I recommend that you use tempvars instead of project properties (I use them to attach version numbers to database objects; they never go away). Project properties are persistent outside of runtime, so if your project calls any ribbon...
Back
Top Bottom