Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

querying using listbox form

Forum home » Delegate support and help forum » Microsoft Access Training and help » Querying using a ListBox in a form

Querying using a ListBox in a form

ResolvedVersion 2010

Matthew has attended:
Access Introduction course
Access Intermediate course

Querying using a ListBox in a form

I am trying to use a ListBox in a Form in order to filter the records shown in a report via a query but I can't find out how to use the selected items in the ListBox in the Criteria builder in the Query.

Matthew

RE: Querying using a ListBox in a form

Hi Matthew,

Thank you for your question.

As far as I am aware, you cannot do this through the Query Builder in Access. You need to write VBA code which is beyond the scope of the forum in this case.

At lunchtime I will check with another colleague and if he has any alternatives I will email you again.

I have however included a link with some sample code.

http://www.fontstuff.com/access/acctut11.htm

I hope this helps.

Regards

Simon

Mon 11 Apr 2011: Automatically marked as resolved.

Access tip:

Choosing data types in Access

Not sure which data type to use for your Access fields? Here are some guidelines to help you choose a data type to assign to a field.

- The Text data type can accept up to 255 characters. For information that will be recorded in paragraphs, use Memo.

- Also use Text for numbers that aren't going to be used in calculations, e.g. phone numbers.

- Use the Currency data type for monetary amounts.

- Use Date/Time for dates.

- Most other numbers can use the Number data type, but the Field Size property may have to be altered.

- For fields that have only two alternatives (yes, no) use Yes/No data type. If there is likely to be a third entry option (e.g. maybe or don't know) use Text instead.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.