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 2869 NeoPa 32,579
Recognized Expert Moderator MVP
I think copying and pasting the code you're actually using would be more useful - to make sure everything is there and in the right place etc.
This is the code:
Private Sub Calendar1_Click ()
WorkDate = Calendar1.Value
End Sub
NeoPa 32,579
Recognized Expert Moderator MVP
I should be a dentist ;) (private joke - please ignore)
What is 'WorkDate' and where is it defined.
I should be a dentist ;) (private joke - please ignore)
What is 'WorkDate' and where is it defined.
Is that because I'm being a pain? My life's work and I'm good at my job! ;)Anyway, WorkDate is a text box, the receptacle for the date from Calendar1. There is no code associated except:
Private Sub WorkDate_Click( )
End Sub
Private Sub WorkDate_GotFoc us()
End Sub
Rio
MSeda 159
Recognized Expert New Member
Question
In your Initial post you said you have multiple lines to enter employee time. On your form do the text boxes on each line link to the same "control source"?
i.e. do you have a Monday line with a date box with "Control Source" TblDate and the same for Tuesday etc.
Question
In your Initial post you said you have multiple lines to enter employee time. On your form do the text boxes on each line link to the same "control source"?
i.e. do you have a Monday line with a date box with "Control Source" TblDate and the same for Tuesday etc.
Yes. Each line will enter that day's date, and as I said in the last post, I changed it from tblDay, tblMonth, and tblYear to a calendar on the form. A text box on each of the lines will populate with the date when you click on the calendar date. The problem is, that particular date will populate on each line, and as the date for each new line is inserted, the new, changed date then populates each line, i.e. click on the calendar for Monday, Nov. 6. and that date would be put in the text box on the first line. The next day, Nov. 7 click on the calendar and Nov. 7 would be would be put in the text box on that line and also in the text box for the previous line, replacing Nov. 6.
Thanks for your help!
MSeda 159
Recognized Expert New Member
If multiple text boxes on your form have the same control source that would cause what you described. A single form only shows one record at a time therefore regardless of the fact that you have multiple textboxes they are all looking at the same feild and record so when calendar or combos update one they all change. send me a screen shot of the design view of your form with a description of the underlying tables, I may be able to make a suggestion.
NeoPa 32,579
Recognized Expert Moderator MVP
Is that because I'm being a pain? My life's work and I'm good at my job! Anyway, ...
I like to see someone with pride in their accomplishments ;)
If the WorkDate control is a TextBox, then I'm confused.
I'm not a great expert on working with forms and all that, but I would have expected that to work on the current record only (as obviously you did).
BTW if your code is exactly as posted, then you have some empty event procedures in there. They can safely be deleted. They are entered automatically by Access as a type of template for code when you select them. Sometimes you just select them to look and don't want to add code. In that case the empty shells are redundant.
Sorry I couldn't be more help.
If multiple text boxes on your form have the same control source that would cause what you described. A single form only shows one record at a time therefore regardless of the fact that you have multiple textboxes they are all looking at the same feild and record so when calendar or combos update one they all change. send me a screen shot of the design view of your form with a description of the underlying tables, I may be able to make a suggestion.
Here it is...[IMG]C:\Documents and Settings\blee\D esktop\Screen shot.doc[/IMG]
MSeda 159
Recognized Expert New Member
That didn't display you can e-mail if you like.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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.
|
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
|
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
|
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?
|
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...
| |
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)
|
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
|
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.
|
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...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
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...
| |