Search results

  1. W

    Public variable declaration

    It runs with an Argument not Optional Option Explicit Public intX As Integer Public Sub x_click() Dim intX As Integer 'declare variable intX = 100 ' call some procedure passing intX Call SomeProcedure End Sub Public Sub SomeProcedure(intX As Integer) 'do somethig with passed value MsgBox intX...
  2. W

    Public variable declaration

    sorry, sure it is misspelled
  3. W

    Public variable declaration

    Hi, I am struggling a while with this and i can not figure out what do i do wrong. I have a form with a button that on click sets a variable Public sub x_click intX=me.text1 end sub I want that variable to be passed for another sub. Public x as integer I put that before the sub When i try to...
  4. W

    Dynamic name of string variable

    Thank you so much, this was exactly what i was looking for. #12 post did not help since the name of the tables were not table1, table 2, etc. Once again the reason for wanted to create this code was to find a solution of emptying all the tables with a simple click while writing codes and see...
  5. W

    Dynamic name of string variable

    I am developing an application and i wanted to have a possibility to "reset" the database while testing, in other words to delete records in multiple tables. So i thought to create those DELETE FROM sql statements, name them so that the difference in the names is an integer at the end: str1...
  6. W

    Dynamic name of string variable

    Thank you for this. Actually this way i got iworking. Though i would like to add several, more than 2 possibility for the variables name.
  7. W

    Dynamic name of string variable

    my question refers only to display that string variable content correctly
  8. W

    Dynamic name of string variable

    thank you
  9. W

    Dynamic name of string variable

    Hi, I try to name a string "dynamically". More precisely having a multiple variables holding strings and i would like to refer to these variables dinamically Dim strSQL1 as string dim strSQL2 as string dim x as string strSQL1="DELETE FROM table1;" strSQL2="DELETE FROM tabel2" for i=1 to 2...
  10. W

    Setfocus on other forms control

    Just the main form setfocus missingForms!frmVisitEnt.Setfocus Thank you for your help. It works now!
  11. W

    Setfocus on other forms control

    Thanks for the fast reply. I copied the code but does not work.
  12. W

    Setfocus on other forms control

    Hi, I have a question with setting focus on another forms control. The code Forms!frmvisitEnt!fsubVisitEntTM.Form!fsubVisitEntTMD.Form.Cost.SetFocus So this sets the focus on the requested control (subform is embedded in the subform of a form). The textbox Cost has the focus however i need to...
  13. W

    run time error 91 - global variable

    Yes it is the startup form and the code runs in onLoad event. Can it simply be that the onload event preceed the global variant set? And that this particular form is corrupted so the on error resume next code is not visible in the cba editor?
  14. W

    run time error 91 - global variable

    if i copy that given startup form, the code works. If i create a new startup form the code fails
  15. W

    run time error 91 - global variable

    To be honest i can not remember
  16. W

    run time error 91 - global variable

    with On Error Resume Next it is of course working. Is it possible that some onLoad event of the form contain this code but it is not visible in the VBA editor?
  17. W

    run time error 91 - global variable

    tried global: does not work. But what i do not understand is that why the same coding works in two other apps made on the same computer?
  18. W

    run time error 91 - global variable

    sorry, obviously public in the code, just misspelled here.
  19. W

    run time error 91 - global variable

    Hi, I am struggling with the following: I have made two different application where i have used the same coding for having a dynamic customized ribbon. In both cases, the same procedure: 1. UsysRibbons table with ribbon code containing onLoad="onLoad" (same naming worked in both instances) 2...
  20. W

    conditional formating with VBA onLoad

    Is this code sufficient to avoid the runtime error? Private Sub Form_Close() For Each ctr In Me.Controls If ctr.ControlType = acTextBox Then ctr.FormatConditions.Delete End If Next ctr End Sub
Back
Top Bottom