473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Matching several criteria for date and time

Hi!

I am about to create a workdatabase that will let directors submit work into it and employees to get a report by filling in details in a form as well.

Then I also have multiple fields of time format that will need to work in the selection form to create a correct report for that employee and the current date.

What I mean is that I want access to check the following when I fill in the date: Which weekday it is; which workpass it is (PM, AM, Night), if it is the first day of the month etc...

Also it will be great if someone know how to make an database entry copying itself and have a regular number increase, for example 5 10 15 20 25 30 and so on.

Thans in advance!
Jun 24 '10 #1

✓ answered by beacon

Hi Victor, welcome to Bytes!

It sounds like you will need at least 2 different, but would probably be served using 3 different forms (in my opinion); one for the directors to enter their data, one for the employees to enter their data, and a form that will allow employees or directors to enter parameters for reports they want to run (you would probably want one of these parameter forms for each report).

For the date/time items you've requested, there are functions that you can use as expressions directly in controls that you put on your form, or as VBA behind the controls on the form. Go to this Microsoft Office site and check out the 'WeekdayName', 'MonthName', and 'TimeValue' functions that are available (or you can search for them on Google or Bing since the examples are somewhat limited).

For the first day of the current month, there's an example VBA formula on the MSDN site.

I'm somewhat confused by what you're asking in your last question, but if I understand it correctly, you will have to have a field with a number data type on your table need to use VBA in your form to search for the maximum number and then add 5 to it.

beacon

3 1495
beacon
579 512MB
Hi Victor, welcome to Bytes!

It sounds like you will need at least 2 different, but would probably be served using 3 different forms (in my opinion); one for the directors to enter their data, one for the employees to enter their data, and a form that will allow employees or directors to enter parameters for reports they want to run (you would probably want one of these parameter forms for each report).

For the date/time items you've requested, there are functions that you can use as expressions directly in controls that you put on your form, or as VBA behind the controls on the form. Go to this Microsoft Office site and check out the 'WeekdayName', 'MonthName', and 'TimeValue' functions that are available (or you can search for them on Google or Bing since the examples are somewhat limited).

For the first day of the current month, there's an example VBA formula on the MSDN site.

I'm somewhat confused by what you're asking in your last question, but if I understand it correctly, you will have to have a field with a number data type on your table need to use VBA in your form to search for the maximum number and then add 5 to it.

beacon
Jun 24 '10 #2
@beacon
Hi Beacon!

Thanks a lot for taking time answering my questions.
In fact I already created a few forms. One for data enter and one for data removal. Actually the form I could not really figure out how to code is about the last one with parameters for report.

I will be looking further into the time parameters to figure out how to get the time to work correctly. For example: I add an issue the 3rd May, and prefers it to repeat once a month, the report should show the same issue again for the report due on 3rd June.

My last question was pointing out the above mentioned issue. Lets say the director enter a new field on 1st september. He will have a listbox in my form to choose how often this will appear in the daily report. If he creates an issue that will occur every 14 days, I want it to appear on the report for 15 sept, 29 sept, 13 oct, 27 oct and so on.

Best Regards
/Victor
Jun 28 '10 #3
beacon
579 512MB
If he creates an issue that will occur every 14 days, I want it to appear on the report for 15 sept, 29 sept, 13 oct, 27 oct and so on.
For the above, check out the DateAdd function. You can use it to accept the date entered by the director and determine what the next date will be in a specific number of days, months, quarters, or years. You can use this against the value in the previous field to determine the next 14 days, so on and so on forever or until an end date if you identify one (you'll likely need another field for the end date).

I will be looking further into the time parameters to figure out how to get the time to work correctly. For example: I add an issue the 3rd May, and prefers it to repeat once a month, the report should show the same issue again for the report due on 3rd June.
For the above, I meant to provide you with a link to an awesome website that details how to create custom forms that pass parameters to the query that your report is based on. Anyway, here's the LINK.
Jun 28 '10 #4

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

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
1
by: Scott Dunham | last post by:
I'm trying to select records between 2 different times, but I can't seem to get Access to see anything other than the date. For instance, criteria "Between #11/12/2001 1:45:00 PM# and #11/12/2001...
5
by: Javier | last post by:
I have a field type Date/Time that automatically defaults to Now(). I'm having a problem writing a query that will retrieve all the records for a specific date the user to enters when prompted. I...
0
by: 321ConTact | last post by:
I am having a bad day for thought, and I can't remember how to create a function that will return a date/time. I have a query with a date field in "mm/dd/yyyy hh:nn:ss am/pm" format. If I enter...
1
by: Jacquo Johnson | last post by:
I am receiving the following error: MS Access Date/Time DBD::ODBC::st execute failed: , , " . "FROM WHERE > '2004/02/01 11:16:16'"; $sth = $dbh->prepare($sqlstatement); $sth->execute ||...
11
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
7
by: 4004 | last post by:
Where am I going wrong? I have a form which has a record for each date on which I teach. It has a subform which shows the classes that I teach that day. So I want to be able to click on a...
2
by: john | last post by:
From an Excel-import I have an access table with a datetime field of wich both date and time are entered. I've set the field's notation properties to Short Date. When I view the table in tableview...
5
by: Stan | last post by:
I am working on a database in ACCESS 2003. Six of the fields provide for entry of service dates 1 to 6 progressively recording when the client was serviced. The data type is Date/Time. I need to...
4
by: Nathan Sokalski | last post by:
When determining whether a String can be converted to a DateTime, you can use the IsDate() method. However, I would also like to know whether the string is a date, a time, or both a date and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.