Access - retrieve the value of a field

cerise -  
 spin -
Hello,

I have a form where I retrieve a value (a number) from another form

but in this same second form, I would like to retrieve this number in another text box

so in the text box, I put

Private Sub Texte25_Change()
Texte18.Value = Texte25.Text
End Sub


but it doesn't work because no value is displayed.

I thought about doing it differently. Let me explain: to go from the first to the second form, I have a button with a macro that saves my entries and opens the second form.

instead of the macro, I want to put VBA code that says to take the number and place it in such and such text box.
My question is the following:
how do you say in VBA that you're taking this value from this form and placing it in the other form?

Can I also save and open the second form in VBA? (which was in the macro)

Thank you!!

Configuration: Windows 7 / Internet Explorer 7.0

4 réponses

f894009 Posted messages 17417 Registration date   Status Membre Last intervention   1 717
 
Hello,

Private Sub Texte25_Change()
Texte18.Value = Texte25.Text
End Sub


No VBA

Property of Texte25

Source

copy the line below by adapting the name of the form (here Form1)
=[Forms]![Form1]![texte25].[Value]
0
spin
 
Hello
f894009, my name is Spin, I am a student in R&T and I need your help. My question is I have a form called (alpha) and in this form, I have a text box called (cp). I want to create a VBA code from this box that opens another form (beta) when the text entered in the (cp) box of the (alpha) form is not stored in the (beta) form, and then copy this text into a text box (teta) of the (beta) form.

Please help me, I am just starting with Access.
Best regards,
Spin
0
spin
 
and if the text entered in the text area (cp) is already stored in the form (beta), we close the loop and move on to the next step.
0