Detecting Consecutive Dates...

Mar 21, 2006

Firstly I have placed this in the general section as I am not quite sure if any vba would need to be created for the following. I would also like to report on the information but the answer may not be done at report level.

Anyway, I have created a very basic database that holds staff attendance and their reason for being absent.

tblattendance:
AttendanceID
AttendanceType
StaffID
AttendanceDate

What i would like to do is group consecutive dates if they are all the same type and show them as DateFrom and DateTo

So for example, for someone who is on holiday between 01/Jan/06 and 06/Jan/06 I could show that as:
DateFrom 01/Jan/06
DateTo 06/Jan/06

I am not sure if that is explained very well but I will try to explain a bit more clearly if needed?

Thanks for any help.

View Replies


ADVERTISEMENT

Reports :: Listing Consecutive Dates In Report

Dec 1, 2013

Is it possible to list out each consecutive date in a report when given a range of dates without having to create a table of dates?

For example, given the date range 12/01/2013 to 12/05/2013:

In report:
12/01/2013
12/02/2013
12/03/2013
12/04/2013
12/05/2013

Is it possible to do this dynamically in vba?

I want to ultimately join this to a recordset for the report.

View 1 Replies View Related

Detecting User?

Sep 22, 2006

Hello.

So, I have a logon form with a combo box for user name and a text box for the password. When they hit login, the user is then looked up and the password verified and if it's good they're taken to a specific screen that gives them specific options. What i want to know is how to hold the value of the user throughout their entire session? The reason for this being, to keep track of what data they enter mainly.

Any help would be much appreciated!

Thanks!

View 4 Replies View Related

Detecting First And Last Record

May 6, 2005

what is the proper method to check if the current record on a form is the first or last record ?

When i try :

If Me.CurrentRecord = acLast Then .....
it does not seem that it detects the the last record.

Similarly with acFirst

Any ideas ?

Thanks

View 2 Replies View Related

Detecting Data

Nov 14, 2006

I have multiple forms, one of which you can view meeting details (form 1), if a mistake is spotted, there’s an ‘amend’ button which brings up a text field to enter in the description.
Now I have another form (form 2) that you can view the meeting details later on, and I want it to display the amendment description if there’s something typed there.
So on form 2, if there’s no amendment description (from form 1), the field stays hiding, but if there’s an amendment description in the field, the field will be visible.
So is there a way to display a field if there’s data entered, or keep it hidden if no data is present?

Thanks in advance

View 1 Replies View Related

Detecting The Current Year?

Sep 22, 2006

Hello.

Just wondering if there was a way to detect the current year? (2006, obviously). Reason being, have an input date of year a block of trees was planted and i want to have an automatic calculation for the 'age of trees'.

Thanks!

View 4 Replies View Related

Detecting Duplicate Entry

May 22, 2006

I have a Form based on a table of current Players in a football league.
The Form is used to edit, but mainly add new registrations. The fields are...

Surname FirstName Address Suburb Age Club YearRegd

Is it possible in some way to have an alert or message come up stating that the Player is already registered if the Table already contains a player with the same Surname and FirstName only. This would need to happen after the FirstName has been entered as it is the second field after 'Surname'. I'm not sure if Access can do this type of function or not.

I've searched the Forums but have had no luck.

Any advice/assistance is greatly appreciated.

Thank-you very much.

View 1 Replies View Related

Detecting A Field Which Cause An Error Message

Jan 21, 2006

I am learning how to create custom error messages.

I know about the "OnError" event of the form, and knows how to replace the standard error message.

I wish access will produce an error message saying something like "You must put a value in field X" (custom made msgbox)

How can I identify this 'field X' which caused the error message to be displayed?

Hope I made myself clear.

Thanks for your comments.

View 6 Replies View Related

Forms :: Detecting Up Or Down Arrow Keys

Jun 4, 2013

Is it possible to detect the Up or Down arrow keys?I've tried using the following in the Form's Key Press event;

Code:
MsgBox "You pressed the " & KeyAscii & " Key"

Which returns the ASCII code for most other key but not the arrow keys

View 12 Replies View Related

Modules & VBA :: Detecting Excel File Is Password Protected

Apr 4, 2014

Any VBA code that would tell me whether an xlsb file is password protected?

View 5 Replies View Related

10 Consecutive Years

Dec 5, 2007

I have atable the is storing ID, attendance_year and meeting code. Iw ould like to query the table and identify the IDs that have 10 consecutive attendance years no matter when it may have occured. So IDs have more than 10 row of data but not necassrily 10 years in a row.

How can I do this?

table looks like

123|2003|WIN03
123|2001|SUM02
456|2001|WIN01
456|2000|WIN00
456|2002|SPR02
456|2006|SUM06

View 5 Replies View Related

Difference In 2 Consecutive Records

Jun 18, 2007

Hi there

I am trying to get a very simple thing done in Access and I must have spent almost over 2 days of Internet time to do so. My problem is that I need to get the difference in 2 records to show in a query.

e.g. MyTable has 2 fields: 1. MyDate 2. MtrReading

Everyday I enter date in MyDate and a number in MtrReading. And I need to find out the difference between today's MtrReading and Yesterday's Mtr Reading.

Any help is greatly appreciated!

Thanks

View 4 Replies View Related

Counting Consecutive Days

May 19, 2005

Hi,

Is it possible to count the number of consecutive days in a table?

I need a query to calculate for a particular customer the number of consecutive days thay have logged a record if its greater than 1

EG: Table layout:

CUST A RC1 05/05/05
CUST A RC2 06/05/05
CUST A RC3 07/05/05
CUST A RC4 08/05/05
CUST A RC5 15/05/05
CUST A RC6 18/05/05

Possible query results:

CUST A 4 Days First 05/05/05 Last 08/05/05

Is it possible to do something like this??

Thanks in Advance

View 1 Replies View Related

Subtracting Values From Two Consecutive Records

Jan 17, 2006

I am having a problem, probably due to my inexperience with Access. Here is the seniero:

-I have a form/table set up for operators to enter numbers on a daily basis.
-I am setting up queries/reports to display not only the entered data, but also calculated values from the entered values
--I have no idea on how to subtract a previous day's value from today's value and report that value.
- Since Access gives no "ownership" to any value I do not know how to reference yesterday's value in today's calculation.Any Ideas?

Example
Record #1
Date - 1/17/06
Value - 15,232

Record #2
Date - 1/16/05
Value - 14,111

Desired output
Date 1/17/06
Value - 1121

View 6 Replies View Related

Find Consecutive Number Of Records In DB!

Aug 14, 2006

Hello,
I am trying to generate some query result on a form.
My DB consists of the following fields : tradeID and profit/loss.
How do i make a query to find the Maximum consecutive number of wins and losses in the database and display the results on a form?


Would really appreciate it if any of you have tried to sort and display results for finding consecutive number of events in any database!


Thanks a lot

View 2 Replies View Related

General :: Notify After Two Consecutive Absents?

Aug 17, 2014

I have a Student Attendance table and it would be great if I could get some way of automatically determining if the attendance status is Absent - Unexcused for two or more consecutive sessions in order for someone to get in contact with the student.

View 14 Replies View Related

Queries :: Consecutive Days Worked?

Sep 19, 2013

I have a table of employees, and dates they worked on. These are seasonal employees who want to get in as many days as possible before the season ends, but regulation states they must take a compulsory rest day after x days.So I need to create a query that can return the list of employees, with a count of consecutive workdays up until current date.

If today is 20/09/2013, and Johnny worked on, 19, 18, 17, 15, 14, 13, his count must be 3, because he was absent on 16. Therefore only from 17 through 19 is regarded as consecutive.

If Peter worked 19, 18, 17, 16, 15, 14, 13, his count would be 7, because unlike Johnny, Peter still worked on 16.

View 12 Replies View Related

Identify Changes In Data Between Consecutive Rows?

Jul 19, 2015

I have data for multiple account numbers (for work) and dates, and I need to identify when there is a change in account number in order to add a new field with a count - which counts sequentially starting with 1 and then starts over at 1 when the account number changes.

Ex. The red column is what I am trying to create

Account Date_To Counter
12345 06/30/2015 1
12345 05/31/2015 2
12345 04/30/2015 3
19999 06/30/2015 1

View 2 Replies View Related

Consecutive Invoice Numbers, Restarting Each Month

Oct 14, 2005

Hi there,
Some scene setting to my problem. I have a corporate system numbering invoices consecutively globally. For a subsidiary in Poland this presents a problem - all invoices for the subsidiary must be consecutive. ie. where the globally issued invoices for Poland might be 1,4,5,7 these need to be renumbered before issue in Poland.

It gets more complicated as the Polish Office standard is to invoice in the format "PL/Year/Month/Number" with the Number restarting from 1 for each month.

My database is very simple.
Table 1 = Link table to Oracle corporate data
Table 2 = Local table of invoices already produced (Global invoice number and date recorded)

I have a filter to find all new invoices (unmatched items), a report to print them and an Append query to populate the new items to the Local table.

My challenge: (1) to recreate the Polish numbering scheme and (2) have it consistently when existing data goes up to mid month and a new append operation has to follow the invoice number sequence.

Any ideas? I guess Autonumber is no good and I have little array experience.

Thanks

View 5 Replies View Related

Count Consecutive Records That Match Criteria

Jan 25, 2006

I want to place a control in a report footer that will return the highest number of consecutive weeks that a profit was earned. The database has fields named WeekNo and Net. The Net field contains positive values (profit) and negative values (losses). The WeekNo field is an integer from 1 to 52 designating the week number.

For example if the figure in the Net field is a positive number I want the control to count the number of consecutive weeks that a profit was earned. I know how to get the value of total weeks that a profit was earned; this is not what I am looking for. The control must return the highest number of CONSECUTIVE weeks that a profit was earned over the year.

Any help would be appreciated.

View 1 Replies View Related

Queries :: Extract Data Between Two Consecutive Comma Set

Jun 16, 2013

102,34112,021502503130010010000,QAR,1,24,1,{NULL:0 },{5:Y},6,14.5,31-MAR-2011

Above data is in one field , i want and expression to extract the data between two consecutive comma set by specifying the comma range.

For example if i specify range 2 to 3 then formula should return "021502503130010010000"

View 14 Replies View Related

Run Multiple Append Queries In Consecutive Order?

Jul 16, 2013

I am setting up VBA to run multiple append queries in consecutive order. The append queries are supposed to pull a four digit number off of a form that will allow them to know which data to append. I want the number to be stored as text to correspond with the tables I am working with, but I am having trouble getting the form to work.

Here is how I would like it to work:

I enter my 4 digits in the text box on the form. Say "1305" for May 2013. I want to then run my vba (my queries update using the forms!txtupdatequery!textbox I have put in the criteria of the queries) and all of them run.

I enter my date (as a number but I want it to be text) and the form gives me a #name? error.

View 3 Replies View Related

Creating Consecutive Identifiers - Automatic Numbering

Sep 17, 2014

I am trying to create a form that creates an automatic identifier with a value one greater than the previous identifier. I was able to create something that updates in batches of two: That is, I end up with identifiers that go 1, 2, 2, 3, 3, 4, 4, etc. How do I get it to create consecutive identifiers (1, 2, 3, 4, etc.)?

View 2 Replies View Related

Queries :: Adding Consecutive Values To Get A Running Total

Oct 23, 2013

I have a quick (hopefully) query about adding up consecutive values to get a running total.

Currently I have the following

ID Value
1 0
2 5
3 2
4 0
5 1
6 30
7 2

etc...

I am looking for a way to get a running total up to the point of a 0 then restarting. e.g.

ID Value Running total
1 0 0
2 5 5
3 2 7
4 0 0
5 1 1
6 30 31
7 2 33

View 12 Replies View Related

Reports :: Create Consecutive Numbers In A Row Based On User Input?

Jul 31, 2013

I have list of candidates shown in report. I need each candidate to have a unique number based on user input. And this number increases by 1 for the rest of the candidates in the report.

Example is below:

If user enters 1132 in the user input box then the numbers shown in report should be as below:

Name Assignment Number

Felicity Thomas 1132
Andrew Sen 1133
Andy Luker 1134

Similarly if number entered is 2345 then the numbers shown in the report will be:

Name Assignment Number
Felicity Thomas 2345
Andrew Sen 2346
Andy Luker 2347

View 1 Replies View Related

Forms :: Dates As Column Headers To Update Table With Dates As Rows

May 12, 2014

Any way to have a form with Dates as column headers to update a table where the dates are stored in rows???

The table set up is like this:
tblOpHdr
DiaryID (PK) - OpDate (Date)

tblOpDetail
DiaryID (FK) - CostCode - MachineNumber - MachineHours - etc

I'm just wondering if there's any way I can do this with a datasheet or a crosstab type setup?

It's Access 2010.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved