1. I use the following to enter comments into a field and have it feed over to a locked field. User's enter comments in the response field, the comments feed over to the history field where it's stored and displayed in chronological order. The comments in the response field are then deleted.
Private Sub Response_AfterUpdate()
Response = Response.Text
History = Now() & ": " & Response.Text & " " & [Submitter] & Chr(13) & Chr(10) & History
Response = " "
End Sub
This is working fine for me on the same form. However, I need it to migrate onto another form as well. Any suggestions?
2. Along the same line, I have table A and Table B as well as form A and form B. Table A is prepopulated (this table is linked) while table B is blank. I want to place a command button on form A that will open form B and populate a like field that will be stored in table B. On form A I have field [authorizations]. I will open form B and I want the [authorizations] field on form B populated with the number from form A.
I set the default on the form B.authorization to:
=[form]![form A]![authorizations]
However, the data doesn't feed down to table B and doesn't create a new record in table B. [Authorizations] on table B will be the primary key, so I only need it to create a new record if the authorization number doesn't already exist on table B. Otherwise, I want it to display the record with the authorization number displayed on form A.
Help on either of these?
Private Sub Response_AfterUpdate()
Response = Response.Text
History = Now() & ": " & Response.Text & " " & [Submitter] & Chr(13) & Chr(10) & History
Response = " "
End Sub
This is working fine for me on the same form. However, I need it to migrate onto another form as well. Any suggestions?
2. Along the same line, I have table A and Table B as well as form A and form B. Table A is prepopulated (this table is linked) while table B is blank. I want to place a command button on form A that will open form B and populate a like field that will be stored in table B. On form A I have field [authorizations]. I will open form B and I want the [authorizations] field on form B populated with the number from form A.
I set the default on the form B.authorization to:
=[form]![form A]![authorizations]
However, the data doesn't feed down to table B and doesn't create a new record in table B. [Authorizations] on table B will be the primary key, so I only need it to create a new record if the authorization number doesn't already exist on table B. Otherwise, I want it to display the record with the authorization number displayed on form A.
Help on either of these?