Passing a value

will

Registered User.
Local time
Today, 12:32
Joined
Jul 11, 2001
Messages
18
Hello,
I have a main form that I record payement records in a text box each month. For certain months there are notes worth recording with the payment. I have a seperate 'Notes' form that opens with a text box that I use to enter notes. What I need is to copy and insert the values from the Notes text box, into the text box on my main form. Basically I need to pass the value between two forms. I get an error saying "Object required" when I try to pass it, my code looks like this:

Private Sub Command2_Click()

Dim x As String
'The Notes Form text box
Notes.SetFocus
x = Notes.Text

'Pass value to main form text box, with date
Me!PaymentHistory!Other.SourceObject
Other = Now() + x

End Sub
 
Working without my own notes, I think that you need something like this:

Dim strNotes as String
strNotes = Now() & " " & me.Notes
[Forms]![MyMainForm]![Other] = strNotes
 
I use the text box on my main form as a kind of history or previous payments. Is there a way to invoke a carriage return before I insert new data into the text box, so the newest entries will be at the top of the text box?
 
Another possibility is to have a linked table with a date field and a memo field. Then you can create a separate entry for each date's activity. If you create a button to make a Continuous Form (sorted descending by date) for this pop up, you will have something that looks very similar but might be more functional.

HTH,
David R
 

Users who are viewing this thread

Back
Top Bottom