|
-
Sep 11th, 2001, 05:49 AM
#1
Thread Starter
Addicted Member
Stuck stuck stuck - BIG TIME
OK. I'll make it simple.
HOW DO YOU CHANGE THE ROWSOURCE AND LISTFIELD PROPERTIES of DATACOMBO (ADO) at runtime???
More details: I know how to change the properties but DATACOMBO doesn't reflect the change (Refill doesn't help). Let's say I want to change it to a different command from my DE.
Please I've been looking all over and can't find it!
-
Sep 11th, 2001, 06:50 AM
#2
Fanatic Member
Does datacombo.refresh not work?
-
Sep 11th, 2001, 06:56 AM
#3
New Member
I don't know either, but...
I would be interested in knowing the answer to this one too.
I am trying to change the row source at startup depending on where the dB is located. The best that I can come up with is setting up a concatenated string which includes the initial bumpf in the datacontrol set up box that you use to set it up at design time and adding the path to the dB in code.
This has worked in a very preliminary pass at the problem. But, I am not even an intelligent beginner with this stuff so I don't really know if that is what you are asking.
-
Sep 11th, 2001, 07:11 AM
#4
Thread Starter
Addicted Member
Refresh doesn't work...
I am trying to workaround this now with having an ADODataControl /which I did not want to use so badly/ and binding combo to this control and changing the recordsource of the dataControl.
But there has to be a different way? Or the ADO isn't that great? Well, I'll be trying but still looking for help here.
RSINGH>> The refill and refresh seem to ignore the changed properites. Even when I change the commandtext of the command it "ignores" the change. It seems to me that the commands get "compiled and populated" when app is started and then remain the same all the time.
PS: I had similar problem some time ago where I had data in a dataCombo but when new record had been added it wouldn't show up /refreshing and refilling every possible object did not help/. The only way was to unload that form and then load it up again - which (I HOPE) is not the only way to do it.
-
Sep 11th, 2001, 07:17 AM
#5
Thread Starter
Addicted Member
this code works fine
OK. This is what I have and it works /two ADO DataControls and 2 dataCombos/.
Except - I DO NOT WAT IT THIS WAY!!!
VB Code:
If dbcboOrg.MatchedWithList Then
adoDTAPeople1.RecordSource = PEOPLE_LEFT _
& dbcboOrg.BoundText & _
PEOPLE_RIGHT
adoDTAPeople1.Refresh
Set dbcboLudia.RowSource = adoDTAPeople1
Label1 = adoDTAPeople1.RecordSource 'Just a check
dbcboLudia.ListField = "FullName"
dbcboLudia.BoundColumn = "ZKID"
dbcboLudia.ReFill
dbcboLudia.Visible = True
dbcboLudia.SetFocus
End If
*PEOPLE_LEFT and RIGHT are string constants (SQL) but that is not important
I would preffer doing this w/o DataControls.
Come on - there's got to be a way !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|