Ok now the dumb thing isnt working again. I put more vba code for a different
form
Private Sub Attendantcombo_AfterUpdate()
ConInfoCombo.RowSource = "SELECT CName FROM PurposeofActivities Where
Coordinator = """ & Me!Attendantcombo & """ ;"
End Sub
and now the code the form isnt working now I have
Private Sub ConNameCombo_AfterUpdate()
Me!medicalAssistanceNumber = Me!ConNameCombo.Column(1)
Me!Coordinator = Me!ConNameCombo.Column(2)
Me!Program = Me!ConNameCombo.Column(3)
End Sub
and i have in the control sources of the text boxes
(medicalAssistanceNumber, Coordinator, Program) which are in same order as
below
= Me!ConNameCombo.Column(1)
= Me!ConNameCombo.Column(2)
= Me!ConNameCombo.Column(3)
Now this adds the MA# into the table and it all work for a little while and
also added the coordinator and program but now it doesnt work. I do not know
what to do now and if i take those out of the control source it still doesnt
change anything but the vba code then works. I dont understand why it worked
and then all the sudden stop.
if you can give any help let me know.
Jeremy
Penguin said:
Try this:
Private Sub ConNameCombo_AfterUpdate()
Me![MA#]=Me!ConNameCombo.Column(1)
Me![Program]=Me!ConNameCombo.Column(2)
End Sub
When I code that into vb:
Private Sub ConNameCombo_AfterUpdate()
Me!ConNameCombo.Column(1) = Me![MA#]
Me!ConNameCombo.Column(2) = Me![Program]
End Sub
It is just giving me and error is there something I am doing wrong? But I
tried going about it by making two other text boxes and changed thier control
sources to:
=[ConNameCombo].[Column](1)
=[ConNameCombo].[Column](2)
Which works but is there a way to save those values to a table?
That works fine
Penguin said:
In the AfterUpdate of the combo box try this:
Me![MedNumber] = Me!ComboBox.Column(1)
Me![Program] = Me!ComboBox.Column(2)
Hope this helps.
On Tue, 4 Jan 2005 13:31:06 -0800, "stag246"
I have a combo box which is named Consumerinfo. It has consumer names,
medicalassistance #s, and what program they are in. Is there anyway I can get
those last two values (MA# and program) to automatically move into a text box
after the consumername is chosen. Or is there a way to get the information in
the 2nd and 3rd column of the drop box to go to a table named information.
Thanks
Jeremy