Data Relations and Ill pay someone now

  • Thread starter Thread starter Merlin
  • Start date Start date
M

Merlin

Hey All,

I`ll Pay someone to tell me this now, as its doing my head in, I carn`t see
out on the net and no one seems to know!

I have a form that connects to a Access database, and I have a combo box on
this form (this combo box has a list of Access Levels, a user would be
able to choose one Access Level out of the combo box).

The combo box is serving double duty, as they usually do, it is giving me a
list of all of the Access Levels in a drop down, and it is also returning
the Access Level of the record that I am retrieving from my Access Database.

Everything works perfectly, but. . .

When I navigate through my records, the combo box (Access Level) does not
change with what the Access Level should be for that particular record, it's
almost like it sticks on the same Access Level. The AccessLevelID
(different text box) changes with every record but the combo box doesn't.

I did some troubleshooting. . .

If I put a text box in place of the combo box it works correctly, but this
does not solve the problem of the user being able to select a Access Level,
hence the need for a combo box.


I`ver tryed to explain this before but unforutnatle i don`t think im
explaining properly, i have a example project that I could e-mail if anybody
could offer me some help?

Any links as I don`t mind reading

Please help.

Thanks.
Merlin
 
Please provide more info on the kind of form you are working with:
WinForm, WebForm or is it an Access Form. and I should be able to help you
more on your issue
 
Hi Merlin,

An e-mail to (e-mail address removed)? Hmm. Is this your real address? ;)
Anyway, how are you binding the combo and how do you move accross records?
 
Many thanks for you reply,

I have my project located @ http://www.forecourtsupport.co.uk/App1.zip i
think it might be easier to see than me explain as im a newbie(ish) i don`t
really know how to tell you things

It is a Windows form project, a very simple one, I tryed to keep it as
simple as possible so I could understand how to tackle this problem

My e-mail address is on the main page of http://www.forecourtsupport.co.uk
if anybody would kindly help?

Many thanks
Merlin
 
You need to bind the combo's selectedvalue property to Users.AccessLevelID datafield or manually set the selected value in the positionchanged method
Bye
 
And also, you might simplify ValueMember from
"AccessLevel.LKLookup.AccessLevelID"

to

"AccessLevel.AccessLevelID"


--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Crad said:
You need to bind the combo's selectedvalue property to Users.AccessLevelID
datafield or manually set the selected value in the positionchanged method.
 
Hey there, thanks for looking Crad & Miha,

What is the position changed value? and how would i set this?

Also i set the selected value property to Users.AccessLevelID & Value Member
to AccessLevel.AccessLevelID, But this shows me the AccessLevelID number
instead of the Manager, Supervisor etc etc.

Many thanks again for all your help
Merlin

Crad said:
You need to bind the combo's selectedvalue property to Users.AccessLevelID
datafield or manually set the selected value in the positionchanged method.
 
Hi,

MadCrazyNewbie said:
Hey there, thanks for looking Crad & Miha,

What is the position changed value? and how would i set this?

If you bind SelectedValue to Users.AccessLevelID then you don't need
position changed.
Also i set the selected value property to Users.AccessLevelID & Value Member
to AccessLevel.AccessLevelID, But this shows me the AccessLevelID number
instead of the Manager, Supervisor etc etc.

Did you leave:
DisplayMember = "AccessLevel.AccessLevel"
 
Hi Merlin,

I think I found it.

You did use for everything the properties from the designer, what I did not
see was the binding from that combobox to the acceslevel in the user.

You have to open the properties from the combobox and than at bindings text
you can add that using the designer.

I hope this helps?

Cor
 
Back
Top