Search results

  1. W

    assigning value to variable

    That is the name of the subform name. txPartner = Forms!frmMassInput.fsubMassInput2.Form.CustomerID works fine
  2. W

    assigning value to variable

    I wrote this but does not work With Forms(frmMassInput) txPartner = .Controls(fsubMassInput2).Form.CustomerID txAmount = .Controls(fsubMassInput2).Form.Total txCurrency = .Controls(fsubMassInput2).Form.currencyX txDescription = .Controls(fsubMassInput2).Form.TreatmentID End With
  3. W

    assigning value to variable

    And for the first method? Sorry for it but i would really like to understand the syntax.
  4. W

    assigning value to variable

    by the first or second method you have suggested? With... or the Set?
  5. W

    assigning value to variable

    Great! And how does it work with subform control?
  6. W

    assigning value to variable

    Thank you. If there is no shorter way, i am going to use this. Works perfectly thanks
  7. W

    assigning value to variable

    no it is not. May be to ask differently: how to avoid to retype every time the part of the code that is repeated. s=Forms!frm1.controlname keep Forms!frm1 and let the controlname change like this s=Forms!frm1 ss=s & controlname1 ss=s & controlname2 etc
  8. W

    assigning value to variable

    Not quite... ss=s & controlname This does not work.
  9. W

    assigning value to variable

    I got it working s=Forms("Your form name").Controls(controlname) controlname="Your Control name1" controlname="Your Control name2" controlname="Your Control name3" Thanks for the help!
  10. W

    assigning value to variable

    It works fine, but when i split it, it fails. The Control name is the one that changes, so what i would like is something like this: s=Forms("Your form name").Controls & controlname whereas controlname=Your Control name1 controlname=Your Control name2 controlname=Your Control name3
  11. W

    assigning value to variable

    Hi, I am trying to shorten the code but i am not sure if it is possible at all, since error is created. What i am trying to accomplish is to use a string that is repeated in several times while the values of the variables are passed from an other open form like this: open form is: Forms!frm1 x...
  12. W

    Passing Array to Sub

    Thank you i will.
  13. W

    Passing Array to Sub

    I have got it worked, marking all records in subform. Private Sub cmdMarkAll_Click() Dim mark() As Variant Dim markall As Recordset Set markall = CurrentDb.OpenRecordset("SELECT mark FROM tbTransactions") markall.MoveLast markall.MoveFirst mark = markall.GetRows(markall.RecordCount) markRC =...
  14. W

    Passing Array to Sub

    Thank you, i understand now
  15. W

    Passing Array to Sub

    Thank you so much. I understand. Actually what i want is to have a button on a main form to select all records in subform. Do you have any suggestion theh?
  16. W

    Passing Array to Sub

    Thank you but i am still do not get it. This the function to create the array and populate with a recordset Function txArray1() Dim tx As Recordset Dim strMarked As String Dim txList() Dim txType As String strMarked = "SELECT * FROM tbTransactions WHERE tx_Status=''" Set tx =...
  17. W

    Passing Array to Sub

    Hi, I have a form/subform object. For some functions i use arrays. In order to make it simplier i try to make a function in a modul that creates the array and then call this function in the forms sub to perform specific task like marking records shown in subform. It would look like this...
  18. W

    OnClick argument

    i see thank you, i thought so but was not sure. Thanks
  19. W

    OnClick argument

    Hi, Just came across this. How the OnClick event argument can be used in case of CommandButton.OnClick event? thanks Andrew
  20. W

    Passing global/public variable between forms

    Thanks for all these inputs! You all just answered my question. Thanks again
Back
Top Bottom