Recent content by songbird3

  1. S

    Open form then run its code

    Thank you for your help! I realized I had the procedure on the opened form created as Private instead of Public. Now it works just fine.
  2. S

    Open form then run its code

    Rabbie, Of course I am using the "On Click" event of the button! This is what opens the form, adds data to a field, etc. My question was not "On what event do I write my VBA code?" I need to add to the existing code to call one subprocedure on the form that is opened.
  3. S

    Open form then run its code

    Thanks, but I don't want this code to run "On Open" event but only run when it is opened with this button. Other times, I open the same form for a different purpose and do not need the procedure.
  4. S

    Help Referencing SubForm Controls in a Module

    Access recognizes TypeOf for controls. Dim ctlData as Control For Each ctlData In Me.Detail.Controls If TypeOf ctlData is TextBox Or TypeOf ctlData Is CheckBox Or TypeOf _ ctlData is SubForm Or TypeOf ctlData is ComoboBox Then ***do stuff*** End If Next
  5. S

    Open form then run its code

    I *had* this VBA code working in Access 2007, overwrote it, and cannot recreate it. I have a switchboard with buttons, click, open a form, and then I need a subprocedure on it to operate. The code that worked only took 3 or 4 lines. My logic probably was open the form, make it the active...
Back
Top Bottom