Comment Field

T

Tony Ramirez

I have a combo box that looks up text in a table and then updates the special
notes field. The only problem that I have is it overwrites Special Notes and
doesn't append to the end. I would like the reps to be able to use the pull
down to build the Special notes...so for example A might = "Minimum Service
Charge equals $15.00." and B might = "Availability: 2-3 Business Days and
Shipping.". These entries are located in a Table called SP_Notes. So the
combo box retives them an populates the text in the field Special Notes in
the form Main. So if they choose A then B the Special Notes field I would
want it to read "Minimum Service Charge equals $15.00. Availability: 2-3
Business Days and Shipping." Again, now it just updates to whatever was
choosen last.
Any ideas?

Thanks!! Tony
 
D

Dirk Goldgar

Tony Ramirez said:
I have a combo box that looks up text in a table and then updates the
special
notes field. The only problem that I have is it overwrites Special Notes
and
doesn't append to the end. I would like the reps to be able to use the
pull
down to build the Special notes...so for example A might = "Minimum
Service
Charge equals $15.00." and B might = "Availability: 2-3 Business Days and
Shipping.". These entries are located in a Table called SP_Notes. So the
combo box retives them an populates the text in the field Special Notes in
the form Main. So if they choose A then B the Special Notes field I would
want it to read "Minimum Service Charge equals $15.00. Availability: 2-3
Business Days and Shipping." Again, now it just updates to whatever was
choosen last.


In this case, you can't bind the combo box to the [Special Notes] field.
You have to leave the combo box unbound (controlsource blank) and use code
or a macro in the combo's AfterUpdate event to append the value of the combo
box to [Special Notes]. VBA code might look like this:

'------ start of code ------
Private Sub cboAddNote_AfterUpdate()

If Not IsNull(Me.cboAddNote) Then

Me![Special Notes] = (Me![Special Notes] + " ") & Me.cboAddNote

End If

End Sub
'------ end of code ------

Note that, because the combo box is not bound to the [Special Notes] field,
it must have a different name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top