| | |
Select Query Problem in access
Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 21
Reputation:
Solved Threads: 1
I have 2 problems I need your help please:
1- How can I map the result of a select query? let's say that I have a table named "Item" and I need to delete a specific item record from this table. So the user first needs to see the information related to this item. That means that I need a "Select Query" that will retrieve the information for this this item. That means after the user enters the item id (assuming that each item has a unique id) thae query will take that item id andretrieve the information of that item. But the problem that I am facing is:
- How to use the item id as a parameter to the query?
- How to use the query result (answer of the query) so that i map each field to its corresponding control (text box and combo box...etc?
2- Does any one has an idea of how to check that an item idn exist or not? I know that i need a query to select that item id and if the return value of the query is null then this item id does not exist. So again the same problem how to check the result value of a select query. As I know that the result of a select query should be stored in a ResultSet object but how to manipulate this object where to put the code?
1- How can I map the result of a select query? let's say that I have a table named "Item" and I need to delete a specific item record from this table. So the user first needs to see the information related to this item. That means that I need a "Select Query" that will retrieve the information for this this item. That means after the user enters the item id (assuming that each item has a unique id) thae query will take that item id andretrieve the information of that item. But the problem that I am facing is:
- How to use the item id as a parameter to the query?
- How to use the query result (answer of the query) so that i map each field to its corresponding control (text box and combo box...etc?
2- Does any one has an idea of how to check that an item idn exist or not? I know that i need a query to select that item id and if the return value of the query is null then this item id does not exist. So again the same problem how to check the result value of a select query. As I know that the result of a select query should be stored in a ResultSet object but how to manipulate this object where to put the code?
HI,
I'll try item 1 first
1) produce a query which links together all the required tables. Check it shows all records.
2) Then filter the records by entering id in id field. Check it only produces one record.
3) Then you can replace the id value in the query with a question in square brackets, eg [Enter id ] Then each time query runs user will be prompted to enter id.
I#ll think about 2) aand come back tomorrow, unless someone else answers it for you.
Denis
I'll try item 1 first
1) produce a query which links together all the required tables. Check it shows all records.
2) Then filter the records by entering id in id field. Check it only produces one record.
3) Then you can replace the id value in the query with a question in square brackets, eg [Enter id ] Then each time query runs user will be prompted to enter id.
I#ll think about 2) aand come back tomorrow, unless someone else answers it for you.
Denis
![]() |
Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Last Entry is Default Value
- Next Thread: pls help meeee
Views: 2880 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for MS Access and FileMaker Pro





