Too many quotes.
docmd.opendform "form1",,,"[date] = "& me.list0
"s4" <(E-Mail Removed)> wrote in message
news:CF25A351-3CCC-4D58-BF98-(E-Mail Removed)...
> Thanks I'll give it a go.
> So that's like docmd.opendform "form1",,,"[date] = "& me.list0"
>
> Thanks
>
> "Pat Hartman" wrote:
>
>> DoCmd.OpenForm "yourformname",,,"RecordKey = " &
>> Me.RecordKeyFromFormField
>>
>> "s4" <(E-Mail Removed)> wrote in message
>> news:3C49F232-3636-450A-A7E9-(E-Mail Removed)...
>> > It's none. You can only select one item.
>> > Would you be able to give me an example of code to display the selected
>> > record please?
>> > Thanks
>> >
>> > "Dale Fye" wrote:
>> >
>> >> What does the MultiSelect property of the listbox have int it (None,
>> >> Simple,
>> >> Extended). If it is anything other than "None", then you cannot get
>> >> the
>> >> "value" of the item that is selected using the listboxes Value
>> >> property.
>> >> You
>> >> will have to loop through the listboxes ItemsSelected collection and
>> >> identify
>> >> the values, something like:
>> >>
>> >> For each varItem in me.lst_myList.ItemsSelected
>> >> debug.print me.lst_myList.column(0, varItem)
>> >> Next
>> >>
>> >> HTH
>> >> Dale
>> >>
>> >> --
>> >> Don''t forget to rate the post if it was helpful!
>> >>
>> >> email address is invalid
>> >> Please reply to newsgroup only.
>> >>
>> >>
>> >>
>> >> "s4" wrote:
>> >>
>> >> > I've tried that, but I only get the first record, I think it might
>> >> > be
>> >> > something to do with the selected property. Anyone know how to refer
>> >> > to
>> >> > the
>> >> > record that's selected?
>> >> > I've tried docmd.openform , , , datefb = me.list20 but I get the
>> >> > above
>> >> > result.
>> >> > Thanks
>> >> >
>> >> > "Pat Hartman" wrote:
>> >> >
>> >> > > The wizard doesn't build the criteria. You need to build it.
>> >> > > Open
>> >> > > the code
>> >> > > module and provide a value for stLinkCriteria.
>> >> > >
>> >> > > "s4" <(E-Mail Removed)> wrote in message
>> >> > > news:CA5F12F9-ABCC-486F-8E18-(E-Mail Removed)...
>> >> > > > Hey, I have a form of records, and a listbox with all of the
>> >> > > > dates
>> >> > > > from
>> >> > > > said
>> >> > > > records.
>> >> > > > Anyone know a way to select one of the dates in the listbox and
>> >> > > > click a
>> >> > > > button to edit that record. I've tried findrecord and openform
>> >> > > > with
>> >> > > > that
>> >> > > > date
>> >> > > > as a filter but I always just get the first record shown.
>> >> > > > Also I have a report and was wondering if you knew how to make
>> >> > > > the
>> >> > > > selected
>> >> > > > record in the same listbox the last record displayed in the
>> >> > > > report,
>> >> > > > sort
>> >> > > > of
>> >> > > > like printing the week ending.
>> >> > > > Thanks
>> >> > >
>> >> > >
>> >> > >
>>
>>
>>
|