Solved show specified data and all records before

basilyos

Registered User.
Local time
Today, 13:19
Joined
Jan 13, 2014
Messages
256
hello guys congratulations for the new look :love:

i have a table with 15 record each record have a unique name
1-A
2-B
3-C
.
.
.
15-X

in a form if i choose from a combo box for example letter D and run the query (or vba code) i want to get all records from D and before

so i will get
1-A
2-B
3-C
4-D

any help?
 
Depending on how you set up the combo box, it might be possible to reference it in the query. It might also be possible to just extract the name field and supply it as a parameter to a parameter query. Once you have the name, assuming the table to be in alphabetic order, you can build a query with a WHERE clause that says "WHERE recordname < selectedname" (of course you fill in your own names for this.)

https://support.office.com/en-us/ar...-reports-8209eb5c-1589-42e2-9b20-4181f4c7a356 (verbiage)

(video)

https://www.access-programmers.co.uk/forums/threads/passing-parameter-from-form-to-query.132949/ (from this forum)
 
Hi basilyos. Just to clarify, are we talking about "before" based on alphabetically or numerically?
 
hey guys sorry for bothering and thanks for helping me

i solved my problem by just using criteria in my query where i add my 15 records table in a specific range
at ID field
criteria = <= [forms]![form1]![id]

so i should delete the post??

thanks again
 
hey guys sorry for bothering and thanks for helping me

i solved my problem by just using criteria in my query where i add my 15 records table in a specific range
at ID field
criteria = <= [forms]![form1]![id]

so i should delete the post??

thanks again
No, Please just mark it as solved. It could likely help someone else later with a similar problem.
 
basilyos, we almost never delete a technical post. We have the usual share of misbehaving members and some of their posts get censored. But we just about NEVER delete a tech post because, as Gasman points out, someone could search for that topic and find previous answers. Which is a good thing for us. Thank you for your contribution.
 

Users who are viewing this thread

Back
Top Bottom