Rabu, 05 Oktober 2011

[MS_AccessPros] Re: Populating an unbound textbox with multi item field

 



Hi All;
I did some more research on the problem below and was able to come up with this;
'deal with multi valued field
Set ChildRS = rst!Stations_Serviced.Value
Do Until ChildRS.EOF
ChildRS.MoveFirst
Do Until ChildRS.EOF
StationList(Counter) = ChildRS!Value.Value
ChildRS.MoveNext
Counter = Counter + 1
Loop
SList = StationList(0)
For i = 1 To Counter - 1
SList = SList + "," & StationList(i)
Next i
Me("SS" & Format(Cnt, "00")) = SList
Loop

Where SList is a comma delimited string of the ChildRS!Value.Value's, if SList contains only one item it works fine, more than that and I get a blank combobox on the form. I found that a lookup combobox in a table allows for multiple selections one on a form does not (What is with that?)
Is there a way to make this work?

Walter Griffin

--- In MS_Access_Professionals@yahoogroups.com, "nkpberk" <wgriffin48@...> wrote:
>
> Hi Group;
> Back with more near impossibilities :-)
> Expanding on A.D.'s faux continuous form (the color box thing) I also have a field in my "trains" table that has a multiple entry field called "Stations_Serviced" indicating what towns/station car pickup and setout takes place, Some trains have more than one location to work.
>
> Anyway, the control is "SSxx" a combobox populated by my "Stations" table and the "IDStation" times how many, is saved to the tblTrain!Stations_Served
> field. Is there a way to make this work with an unbound combobox?
>
> I get an error message "64224 Method 'Collect' of object 'recordset2' failed"
>
> I cannot find any reference to this in "Help" so this is cryptic at best.
>
> Walter Griffin
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar