User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 455,864 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,626 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 2057 | Replies: 3
Reply
Join Date: Jul 2006
Posts: 21
Reputation: lover99509 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
lover99509 lover99509 is offline Offline
Newbie Poster

Help Select Query Problem in access

  #1  
Jul 2nd, 2007
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Location: Oxfordshire, England
Posts: 307
Reputation: DenisOxon is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 14
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: Select Query Problem in access

  #2  
Jul 2nd, 2007
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
Reply With Quote  
Join Date: Jul 2006
Posts: 21
Reputation: lover99509 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
lover99509 lover99509 is offline Offline
Newbie Poster

Re: Select Query Problem in access

  #3  
Jul 3rd, 2007
Thanx for your replay but the thing that i really want is:
when the user enters the item id then the item id text box control will lose the focus (lost focus event) after that i want the query to be executed and the results to be shown for the entered item id.

I will try yours and see
Reply With Quote  
Join Date: Jan 2007
Location: Oxfordshire, England
Posts: 307
Reputation: DenisOxon is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 14
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: Select Query Problem in access

  #4  
Jul 4th, 2007
Hi

If you get my suggestion working and then if you replace 3) with the contents of the textbox the query will use the id in the textbox.

Denis
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS Access and FileMaker Pro Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 6:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC