Passing two Cobobox value to two texbox in form

Pro

Registered User.
Local time
Today, 07:14
Joined
Apr 28, 2015
Messages
19
Hello All ..

fix code Please ...


Private Sub CardName_AfterUpdate()

Me.Purchasing = Me.CardName.Column(2)
Me.Selling = Me.CardName.Column(3)
End Sub

I get value of Column(2) in Purchasing textbox
but in Selling textbox not
why ?
 
Their is no way for us to know without seeing some data or pics.
Are you sure you have both values (2) and (3) in record source?
 
Yes I sure
when I select from CoboBox [CardName] I get value to Purchasing textbox that match Me.CardName.Column(2)

But in Selling textbox still empty
I think the problem with code
 
Are you sure their is a value in (3) ? Verify.
Post pic of your query.
 
Are you sure you field name is Selling? Verify
 
Nothing further stands out to me. Except if Selling is not locked and values can be added.
Otherwise. Maybe someone else can assist you.
 
Thank you for your assist
not locked ...
who can assist me ?
 
Have you tried inspecting the value of Me.CardName.Column(3) at runtime.
Have you tried deleting the text box and then recreating it.
 
What do you get if you add this to your code

Msgbox Me.CardName.Column(3)
 
What you posted should work. The fact that it doesn't suggests that something else is happening that you are not be aware of, like, the rowsource of the combo may be changed by code when the form opens.

I think you need to post a database that demonstrates the problem, and we can study that and find the cause.

All the best,
 
Run-time error '94':
Invalid Use of Null

----------------------------
also I try for Column(2)
I get the value
 
Last edited:
Thank you MarkK
But how I do that ?
you mean upload it ?

What you posted should work. The fact that it doesn't suggests that something else is happening that you are not be aware of, like, the rowsource of the combo may be changed by code when the form opens.

I think you need to post a database that demonstrates the problem, and we can study that and find the cause.

All the best,
 
I find the problem :D

In combo box I was set Column count 2
now I change it to 4

Everything is ok

Thank you all My Friend

burrina ,, bob fitz ,, MarkK
 

Users who are viewing this thread

Back
Top Bottom