i'm not able to make a row source update depend on a value in a other field in access 2010

hi

i have a database that have a form with the name "orderdetailsf", and i want that when i update a combo field with the name "modelcombo" that the combo box "sizecombo" row source  will be update, but when i update the "modelcombo" the size combo is empty  

and there is my code
and i attach also my database
Dim StartSize
Dim EndSize
StartSize = DMax("startsize", "modelt", "modelid=" & ModelCombo)
EndSize = DMin("endsize", "modelt", "modelid=" & ModelCombo)
SizeCombo.RowSource = "SELECT SizeID, Size " & _
                        " FROM SizeT " & _
                       " WHERE Sizeid Between " & StartSize & " AND " & EndSize & "

Open in new window

sample.zip
bill201Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Try this attached
sampleMX-01.zip
bill201Author Commented:
thanks thousand  times for your fast answer
it's working geat but please tell me what you do
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
It was actually working, but the Column Widths property for the SizeCombo had an extra zero ... so, the column you wanted to display was blank.

0;0;1 ..... should be 0;1

mx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bill201Author Commented:
unbelievable:) this all !?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Yep ... you were close.

mx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.