473,803 Members | 4,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a date field to db

25 New Member
Hi all!

My database allows all employees to enter their time and get a report at any time. The first screen has a calendar which is locked to the last day of the pay period and that date is the only one currently in place. The user selects his/her name from a dropdown, clicks the calendar, then "Next" to get to the time input screen. There are combo boxes to select the cost code, project, and company name. Separate boxes are available for the number of hours worked Sunday thru Saturday, and the employee can input their time for each day on separate lines, if they choose to. This allows them to have a separate line for regular time, vacation hours, hours worked in different projects, etc. Most of our employees are exempt, but the salaried ones are needing a mechanism to enter the date in each line for all of their hours. With this need in mind, I put in three combo boxes based on three tables: tblMonth, tblDay, and tblYear. Problem is, when I select January, as an example, from cboMonth, all of the available lines are populated with January. The same thing occurs with cboDay and cboYear. I really can't figure out where I have gone wrong and would appreciate any help.

Thanks in advance for whatever help anyone can render, and if you need to actually see the database, I will gladly send it.

Thanks!

Rio
Nov 7 '06
27 2868
Rio Liaden
25 New Member
That didn't display you can e-mail if you like.

Hopefully you have received the screen shots. Ignore the comment box that says the calendar is informational. I want it to be functional.
Nov 9 '06 #21
NeoPa
32,579 Recognized Expert Moderator MVP
Some links don't work when first posted (many web links for instance).
I get around it by editing post immediately and saving with the 'Automatically parse links in text' option set.
Nov 9 '06 #22
Rio Liaden
25 New Member
Some links don't work when first posted (many web links for instance).
I get around it by editing post immediately and saving with the 'Automatically parse links in text' option set.

Thanks! I actually tried that but my shots were too large even after I zipped them. Is that common?
Nov 9 '06 #23
MSeda
159 Recognized Expert New Member
Just to describe the form for others:
the form view is set to continuous forms so a user can enter multiple records into the time sheet. there is a calendar control in the form footer whose on click sets the work_date textbox in the detail section.

My previous comment of having multiple textboxes applied to a single form view. you have a continuous form view. The work_date text box is currently unbound.
so when calendar changes the date all work_dates in the detail section change since there is nothing to hold the value.
Once you set work_dates "control source" property to the field you want to store the date in, this will stop and the calendar will only reset the current records date.
Nov 9 '06 #24
NeoPa
32,579 Recognized Expert Moderator MVP
I thought I saw star quality.
MSeda - a credit to these forums.
Nov 9 '06 #25
Rio Liaden
25 New Member
Just to describe the form for others:
the form view is set to continuous forms so a user can enter multiple records into the time sheet. there is a calendar control in the form footer whose on click sets the work_date textbox in the detail section.

My previous comment of having multiple textboxes applied to a single form view. you have a continuous form view. The work_date text box is currently unbound.
so when calendar changes the date all work_dates in the detail section change since there is nothing to hold the value.
Once you set work_dates "control source" property to the field you want to store the date in, this will stop and the calendar will only reset the current records date.

What is the WorkDate control source? I sort of understand, but I need to bind the text box to the control source and I'm not sure what the control source is. It is the calendar but I'm a bit confused.
Nov 9 '06 #26
MSeda
159 Recognized Expert New Member
The Control Source is the field in the underlying table where the data is stored.
i.e. when you have a combo box named Task ID on your form when a user selects a task it saves there selection in the task ID column of the underlying table. if you open the properties menu for the task ID combo box on the data tab you will see "control source" says "task ID".
The Work Date text box on the form you sent me reads "Unbound" meaning it is not set to save the data anywhere. open the properties window for work date and set the control source to the appropriate feild in your table. you will find Control Source has a drop down list of all feilds in the source table or query. If you don't already have a date feild in the table you need to create one with a date/time data type before you can do this.
Nov 9 '06 #27
Rio Liaden
25 New Member
The Control Source is the field in the underlying table where the data is stored.
i.e. when you have a combo box named Task ID on your form when a user selects a task it saves there selection in the task ID column of the underlying table. if you open the properties menu for the task ID combo box on the data tab you will see "control source" says "task ID".
The Work Date text box on the form you sent me reads "Unbound" meaning it is not set to save the data anywhere. open the properties window for work date and set the control source to the appropriate feild in your table. you will find Control Source has a drop down list of all feilds in the source table or query. If you don't already have a date feild in the table you need to create one with a date/time data type before you can do this.

You know, MSeda, you are a credit to this forum. I needed a memory jog and you gave it to me. I have been so frustrated with other aspects of my job that I could not think. I have built many databases from scratch but unfortunately, I inherited this one. I did not go back to basics and therefore, sounded like an idiot on this forum. Forgive me. I did as you instructed, put in a WorkDate field (duh!) bound it and my form is doing exactly what I needed.

Thank you so much again and when my head settles back on my shoulders, believe it or not, I may one day be able to help you! Definetely not as much as you helped me, but hopefully a fraction!

Rio
Nov 9 '06 #28

Sign in to post your reply or Sign up for a free account.

Similar topics

11
14414
by: Bobbak | last post by:
Hello All, I have these tables (lets call it ‘EmpCalls', ‘EmpOrders', and ‘Stats') that each contain the list of EmployeeIDs, I want to be able to create a Module in which I could call in my VB form (by clicking and command button)that will add a column (field) to each table and label it with the current date that is specified in my form. Does anyone know how I can go about doing this? Any suggestion will be greatly appreciated.
6
3077
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a record such as: part number 202354-001 location C1-01
5
1756
by: hasanainf | last post by:
Hi, Need help on this report My report displays as follows Receipt Number Checkout Date Payment Date 13580 30-06-2005 02-07-2005 13581 01-07-2005 02-07-2005
3
4889
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
0
929
by: wellery | last post by:
I'm trying to work out how to do this. So far I keep getting errors "Unable to find control ID..." What I've got is a datefield control which draws a calendar popup and a text field. I draw two of these date fields on a page by adding them to the controls collection. The dates work fine however I want to add validation to them to ensure the first date is less than the second date but this isn't working. So far I'm doing this: //creat...
5
3482
by: GarryJones | last post by:
I have code numbers in 2 fields from a table which correspond to month and date. (Month, Code number) Field name = ml_mna 1 2 3 etc up to 12 (Data is entered without a leading zero)
2
2566
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received - 20/6/07 Certificate - yes What I want to create is a renewal date for this training, there are
17
3453
by: ginajohnst | last post by:
Hi All. I'm having a problem adding days to a date. My date is in the string format dd/mm/yyyy eg. 23/08/2007 in my form field. I can't work out how to add 50 days to that date and then write it to another form field.
3
2638
by: Celal | last post by:
Hi, I couldn't get around a problem about decimal rounding up when adding a record to a table from a form by programming a button. I have an invoice form where the grand total is a calculated text field. The command button "cmdProcess" is supposed to add some fields (customer no, invoice date, grand total (as receivable), currency etc) to a table which keeps track of customer transactions. However, the decimals of grand total field is rounded...
1
4911
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
10548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.