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 425,789 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,164 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: 936 | Replies: 2
Reply
Join Date: Sep 2006
Location: South Africa
Posts: 15
Reputation: Loony064 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Loony064's Avatar
Loony064 Loony064 is offline Offline
Newbie Poster

MS Access - Running a Query in a Form

  #1  
May 28th, 2008
Hey All!

I'm currently creating a database for a payroll system. I have a table consisting of Occupation_ID (primary key), occupation_description, normal_rate and then 3 different overtime rates. I've created a query to calculate the overtime rates for the different overtime rates, i.e.

UPDATE Occupation_Rates_Table 
SET occupation_rate_overtime_1 = Occupation_Rate_normal*1;

For each different overtime rate, the occupation_rate_normal is multiplied by a different value.

I then created a form that displays all the fields in the Occupation Rates Table and allows the user to add, delete and edit the various fields. I also created buttons to run the 3 queries to calculate the overtime rates. Thats where i'm struggling.

I want the queriesto apply only to the selected record, i.e. if i add a new occupation with
Occupation_ID = 10, Occupation_Desc = Accountant, Normal_Rate = R50, i want to calculate the overtime rates just for that entry, but the way i've done it, it runs for every record in the table.

Any suggestions on how i can change it so it updates only a single record would be much appreciated.

Thanks
Laura
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 11
Reputation: Mikepf is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Mikepf Mikepf is offline Offline
Newbie Poster

Re: MS Access - Running a Query in a Form

  #2  
May 29th, 2008
You must select the desired record using a key to the table(s).
Reply With Quote  
Join Date: Sep 2006
Location: South Africa
Posts: 15
Reputation: Loony064 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Loony064's Avatar
Loony064 Loony064 is offline Offline
Newbie Poster

Re: MS Access - Running a Query in a Form

  #3  
May 29th, 2008
Could you elaborate on that for me please or give me an example.

thanks
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 3:16 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC