Update two fields with one selection !!

ma77smith

New member
Local time
Today, 11:41
Joined
Aug 7, 2003
Messages
9
Hi Folks,

As I think I have been going down the wrong route to find a solution to the following problem, I will tell you the scenario and see if anyone has any bright ideas ...

I have a table which contains supplier id and customer Id fields, both of which are the same !! the reason being is this database uses visual basic code to output a EDI message, and depending on who we are sending to they read it different ways - but we need both fields and need them both the same.

Up until now both fields have had a default value assigned to them, which is fine as our supplier id and cust id hasn't changed. Now our company is operating using two different supplier/customer ids ...

Basically what I need on my form is a combo box or similar which allows the user to put in the supplier code we need to use at that time, and then puts the same entry in to both supplier id and customer id fields !! (btw, neither of these are primary keys)

of course it easy for me to do this for one field, but I need both fields to be the same on input.

I cannot see how I can do this, although I presume it's possible !!

can anyone help me plzzzzzzzz

Matt
 
Have an unbound combo with your options...


Have two hidden textboxes on your form bound to the different fields.

Assuming that the textboxes are Text1 and Text2 put this code in the AfterUpdate event of the combo...


Code:
Private Sub MyCombo_AfterUpdate()
    Me.Text1 = MyCombo
    Me.Text2 = MyCombo
End Sub
 

Users who are viewing this thread

Back
Top Bottom