UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Clear The Subform Datas Temporarily In Msaccess    
 
   
amy
post Jun 7 2018, 07:38 AM
Post#1



Posts: 14
Joined: 16-April 18



Hi,
I am creating timesheet for employees.
I have created main form with their windows login with their names,id and department fields from employee table.
I have subforms with time id,date ,project,hours field in subform.
Can anyone help me how i can clear the timesheet data temporarily in the subform when the user wants to enter their new weekly time sheet.
I have a clear timesheet button.
my question is how to clear the subform datas when the user try to enter their new timesheets or click the clear timesheet button, the old records should be saved inthe table.
Your help is appreciated.

Thanks


Attached File(s)
Attached File  Clrsub.PNG ( 56.56K )Number of downloads: 6
 
Go to the top of the page
 
GroverParkGeorge
post Jun 7 2018, 08:09 AM
Post#2


UA Admin
Posts: 32,838
Joined: 20-June 02
From: Newcastle, WA


We need a bit more information about the TABLE(S) involved and about the way the subform is populated.

How you "clear" the subform depends largely on those data sources and how you are using them.

Thanks for clarifying.

It may be helpful, in fact, to upload a copy of the accdb with just enough sample data to see how it is supposed to work. Make sure you remove and confidential information, compact and repair the copy, and compress it into a Zip file for upload. Thanks.

--------------------
Go to the top of the page
 
amy
post Jun 8 2018, 06:53 AM
Post#3



Posts: 14
Joined: 16-April 18



I am using 2 tables here.
Employees table with id,name,department etc and employee id as (PK)
Time Tracking table which i use for subform with time id,date,job number,operation number,hours with Time id as (PK) and Employee id as (FK).
When the user opens the access Timesheet databse,it tracks him with his windows login and his name,id and department will be populated by default.
He can go and select the date,job number,hours and total will be displayed.
My question is how the subsheet will be as a new sheet after everyweek when he wants to enter his details for that week.
Hope you could get what i am trying to say. pls let me know if you hav any questions.

Thanks
Go to the top of the page
 
GroverParkGeorge
post Jun 8 2018, 09:45 AM
Post#4


UA Admin
Posts: 32,838
Joined: 20-June 02
From: Newcastle, WA


Okay, thanks for clarifying.

You can use a filter on the query that provides records to the subform's recordsource.

That filter will be a date range, i.e. from Monday, June 4, 2018 to Friday, June 8, 2018, or whatever is appropriate.

Then, when the user selects the work week for which they want to enter their work, requery the subform. That will either show work for prior weeks, or no records for new weeks not yet entered.

So, this is pretty straightforward, although you may need a bit more coaching with some of the details. If so, post back.



--------------------
Go to the top of the page
 
amy
post Jun 11 2018, 06:44 AM
Post#5



Posts: 14
Joined: 16-April 18



Hi GroverparkGeorge,
Thank you so much for your suggestion.sure will try this and keep you posted.

Thanks
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    24th June 2018 - 11:36 AM