how to make a pick list

  • Thread starter Thread starter njem
  • Start date Start date
N

njem

I want to make a datasheet type form and have the user click on a line
to bring that record up in a more detailed view. I had this working at
one time but now I can't get it working any way. I've tried an on-
click event for both the form or for a particular field (like last
name). I use the macro builder to have that execute an open-form with
a "where condition" something like [Forms]![list names]!
[LastName]=[Forms]![data entry]![LastName]. It brings up the form but
either blank (as in the field boxes are there but no data) or really
blank, as in nothing at all.

Thanks,
Tom
 
I want to make a datasheet type form and have the user click on a line
to bring that record up in a more detailed view. I had this working at
one time but now I can't get it working any way. I've tried an on-
click event for both the form or for a particular field (like last
name). I use the macro builder to have that execute an open-form with
a "where condition" something like [Forms]![list names]!
[LastName]=[Forms]![data entry]![LastName]. It brings up the form but
either blank (as in the field boxes are there but no data) or really
blank, as in nothing at all.

Thanks,
Tom

why not just use the combobox wizard that does this?
 
Put this code in the AfterUpdate of a ListBox on the form. The LearnerID is
the primary key in this case. The RowSource is the same as the data form. A
list is useful where you have a limited number of records which can be
displayed in a single screen. For large numbers of records, consider using a
ComboBox, as suggested, with the same code.

****************Code Starts****************
Private SubMyList_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LearnerID] = '" & Me![MyList] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
***************Code Ends*********************

I want to make a datasheet type form and have the user click on a line
to bring that record up in a more detailed view. I had this working at
one time but now I can't get it working any way. I've tried an on-
click event for both the form or for a particular field (like last
name). I use the macro builder to have that execute an open-form with
a "where condition" something like [Forms]![list names]!
[LastName]=[Forms]![data entry]![LastName]. It brings up the form but
either blank (as in the field boxes are there but no data) or really
blank, as in nothing at all.

Thanks,
Tom

why not just use the combobox wizard that does this?
 
why not just use the combobox wizard that does this?

A combo box is a clumsy way to to select when there are a few thousand
records and you want to be able to quickly switch between sorted by
name or by number. In a datasheet view you know if what you're looking
is about 3/4 of the way down you just quickly pull the vertical slider
down that far and you're in the ballpark. So no, list boxes and combo
boxes really don't fit the bill. I use them for short lists.

Thanks,
Tom
 
Combo boxes with the "predictive text" capapbility are probably ideal for
large lists. Start typing and it predicts the entry for you. wrt to different
sort options, I use Option Groups to change the row source of the combo box,
sorted by name or number etc.

A select case statement changes the AfterUpdate action of the combo box
depending on the selection in the option group.

Sounds like a lot of work, and it is, but it's the only way I've found to do
this. I will keep an eye on this thread for an easier method from the experts
- I often resort to workarounds that I can mange with my limited resources.

The alternative, of course, is a combo box for each sort order - but this
starts to fill the screen....
 
I want to make a datasheet type form and have the user click on a line
to bring that record up in a more detailed view. I had this working at
one time but now I can't get it working any way. I've tried an on-
click event for both the form or for a particular field (like last
name). I use the macro builder to have that execute an open-form with
a "where condition" something like [Forms]![list names]!
[LastName]=[Forms]![data entry]![LastName]. It brings up the form but
either blank (as in the field boxes are there but no data) or really
blank, as in nothing at all.

Thanks,
Tom

Have you tried
[Forms]![list names]![LastName]=Like [Forms]![data entry]![LastName]

in SQL record source criteria?

Regards,
Branislav Mihaljev
 
You cannot use both = and Like in a single statement.

And using Like without having wild card characters in the string is no
different than using =.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I want to make a datasheet type form and have the user click on a line
to bring that record up in a more detailed view. I had this working at
one time but now I can't get it working any way. I've tried an on-
click event for both the form or for a particular field (like last
name). I use the macro builder to have that execute an open-form with
a "where condition" something like [Forms]![list names]!
[LastName]=[Forms]![data entry]![LastName]. It brings up the form but
either blank (as in the field boxes are there but no data) or really
blank, as in nothing at all.

Thanks,
Tom

Have you tried
[Forms]![list names]![LastName]=Like [Forms]![data entry]![LastName]

in SQL record source criteria?

Regards,
Branislav Mihaljev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top