Duplicate text on form (1 Viewer)

luzz

Registered User.
Local time
Today, 09:08
Joined
Aug 23, 2017
Messages
346
Hi all, i would like to ask how to have duplication of text on the form.

For example i have selected two data on my list box on the form and my form is only able to show one record at a time, hence if i want to do the second record i will have to click next on my form which will then display the second record.

I want to ask how can i key in remarks in the first and it will automatically duplicate over to the second record which can save the hassle of typing the same remarks twice? Thank you.
 

GinaWhipp

AWF VIP
Local time
Today, 12:08
Joined
Jun 21, 2011
Messages
5,901
Not sure I understand what you're asking... If you are saying you want to see the current record and the new record then I'm thinking you're going to need an UNBOUND pop-up and then run and APPEND query to send to your *live* table.
 

luzz

Registered User.
Local time
Today, 09:08
Joined
Aug 23, 2017
Messages
346
Not sure I understand what you're asking... If you are saying you want to see the current record and the new record then I'm thinking you're going to need an UNBOUND pop-up and then run and APPEND query to send to your *live* table.

Hmm i just need to know how to have the remarks that i key in the first record and it will automatically be duplicate to another record.
 

GinaWhipp

AWF VIP
Local time
Today, 12:08
Joined
Jun 21, 2011
Messages
5,901
Oh, so you just want to copy\paste them to a new record. Okay, is this a Form or Form\Subform set up?
 

luzz

Registered User.
Local time
Today, 09:08
Joined
Aug 23, 2017
Messages
346
If you can change to a continuous form, you can use Ctrl+' (apostrophe) to fill down from the previous record. See https://www.access-programmers.co.uk/forums/showthread.php?t=297833

Otherwise you'll have to do this using code e.g. set the default value equal to that of the previous record

Yes, i am using code. In fact i am able to copy the remark header to another record. But i am not able to copy the remarks with full detailed type in to another record.

Below is my code:
Code:
  If Trim((rec.Remarks & "") <> "") Then
            .txtRemarks = rec.Remarks
        Else
                .txtRemarks = "1) Please State: " & vbCrLf & _
                "2) Shrinkage: Maximum W:6% L:6% Twist:Maximum 3%" & vbCrLf & _
                "3) Fabric Weight: +/- 5gm" & vbCrLf & _
                "4) Width Tolerance: +/- 1 inch" & vbCrLf & _
                "5) Buyer: Season:"
        End If
 

isladogs

MVP / VIP
Local time
Today, 16:08
Joined
Jan 14, 2017
Messages
18,186
Not sure what rec.remarks means.
But from your description the Else part can be set as the default text for that control
 

luzz

Registered User.
Local time
Today, 09:08
Joined
Aug 23, 2017
Messages
346
Not sure what rec.remarks means.
But from your description the Else part can be set as the default text for that control

rec.remarks stands for the remark recordset.

What does this means "the Else part can be set as the default text for that control"
 

isladogs

MVP / VIP
Local time
Today, 16:08
Joined
Jan 14, 2017
Messages
18,186
Ok. Replace the rec recordset with a string variable strRemarks.
Set that value in the after update event of your textbox control.
Then in form current event use something like
Code:
 me.txtRemarks =Nz(strRemarks,"")

In the default value property of the txtRemarks control, enter your multi line text on several lines omitting all the quotes and vbcrlf

As a separate point, if you want you can format the default in grey and entered text in black or whatever.
 

luzz

Registered User.
Local time
Today, 09:08
Joined
Aug 23, 2017
Messages
346
Ok. Replace the rec recordset with a string variable strRemarks.
Set that value in the after update event of your textbox control.
Then in form current event use something like
Code:
 me.txtRemarks =Nz(strRemarks,"")

In the default value property of the txtRemarks control, enter your multi line text on several lines omitting all the quotes and vbcrlf

As a separate point, if you want you can format the default in grey and entered text in black or whatever.

Thank you, but it does not work
 

isladogs

MVP / VIP
Local time
Today, 16:08
Joined
Jan 14, 2017
Messages
18,186
Thank you, but it does not work

So what happens? Error message. Access crashes. Nothing at all?
Did you set strRemarks value in the After_Update event for the textbox?
 

Users who are viewing this thread

Top Bottom