Remember Data

  • Thread starter Thread starter theworm
  • Start date Start date
T

theworm

Guest
I'm sure this is very simple, but I'm having issues with it. I have a simple form with some text fields and command buttons on it. Location, ID, and Date and add record button when you click the cmd button, I want the next form to show the Location and ID that was just entered. I want that data to stay there, till I change it. I have looked into the setvalue macro with the defaultvalue, but I can't seem to get that to work. Any other suggestions.
Thanks in advance.
 
Try using code rather than a macro. On the On Open Event of the form that opens after pressing the cmd button use

Code:
Private Sub Form_Open(Cancel As Integer)
Me.NameOfLocationTextbox=Forms!NameOfOtherForm!NameOfLocationTextbox
Me.NameOfIDTextbox=Forms!NameOfOtherForm!NameOfIDTextbox
End Sub

HTH
 
Thanks, I will try it.
 

Users who are viewing this thread

Back
Top Bottom