Update unbound text box on form load and/or next record (1 Viewer)

Morphies

Member
Local time
Today, 17:39
Joined
Dec 8, 2021
Messages
30
Good morning all,

Appreciate the help! I have had a quick search but couldn't find this one. I'm sure it'll have been answered before though.

Issue: Unbound text box does not display data when form loads and does not update when switching between records on the form.

Form Name: Frm_ExposureMaster
Form Type: Single Form
Bound Combobox: cmbPipeSize
Unbound text box: TxtPipeDetails

TxtPipedetails is set to show columns 1 through 5 of cmbPipeSize, so the event procedure on cmbPipeSize is set to:

Code:
Private Sub CmbPipeSize_AfterUpdate()

    TxtPipeDetails = CmbPipeSize.Column(1) & Space(20) & CmbPipeSize.Column(2) & Space(20) & CmbPipeSize.Column(3) & Space(20) & CmbPipeSize.Column(4) & Space(20) & CmbPipeSize.Column(5)
    
End Sub

Thanks,

Morphies.
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:39
Joined
Sep 21, 2011
Messages
14,045
Use the current event of the form.
Plus are you sure?, that is a lot of space characters? :(
 

Morphies

Member
Local time
Today, 17:39
Joined
Dec 8, 2021
Messages
30
Thanks, that'll work.

And yeah it's just for formatting as I have labels above the text box.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:39
Joined
Feb 19, 2002
Messages
42,971
Looks like a poor table design. You seem to have a repeating group.
 

Users who are viewing this thread

Top Bottom