Search results

  1. L

    Calculate Age Function

    I have the following function to calculate the age based on the DOB: Function Age(varDOB As Variant) As Integer Dim varAge As Variant If IsNull(varDOB) Then Age = 0: Exit Function varAge = DateDiff("yyyy", varDOB, Now) If Date < DateSerial(Year(Now), Month(varDOB), _...
  2. L

    Passing OpenArgs To A Subform

    I have a button on a form(Form1) with the following code: DoCmd.OpenForm "Form1", , , , , , "ReadOnly" On the load event on Form2 I have the following code: If Me.OpenArgs = "ReadOnly" Then Me.FieldName.Locked = True Me.FieldName.BackColor = 12632256 Else Me.FieldName.Locked =...
  3. L

    Check for Query & Delete

    I have a form that on the close event I would like to check to see if a query exists. For example: Private Sub Form_Close() If QueryName exists then DoCmd.DeleteObject acQuery, QueryName DoCmd.Close DoCmd.OpenForm "FormName" Else DoCmd.Close DoCmd.OpenForm...
  4. L

    Check If Tables Exists

    I guess I am not following how to make your code work for more than one table, i.e., send the table name.
  5. L

    Check If Tables Exists

    I have code that creates 3 tables by linking to 3 .txt files. What I would like to do is check that all 3 tables were created. This is what I have so far: Dim db As Database Dim tbl1 As TableDef Dim tbl2 As TableDef Dim tbl3 As TableDef Set db = CurrentDb Set tbl1 =...
Back
Top Bottom