Forms :: Custom Autonumber With Year And Month

Aug 12, 2013

I need to create an "autonumber" field in the following format:

FYYMMXX

Where F is a constant, YY is the year, MM is the month, and XX is an incremented number. So for example, the first record in August of 2013 would be "F130801".

I've been checking other threads but haven't been able to follow them to a resolution. I think there is a way to do this within my form...

View Replies


ADVERTISEMENT

Reports :: Custom Reports Creating Chart Based On Month Not Calendar Year

Jun 15, 2015

I am editing a database that provides the option of creating custom reports, where the user can input a date range of their choice and receive aggregate data for that time frame. Although all of the numbers in the report are correct, I am having trouble with a chart that I inserted into the report.

Specifically, if the date range requested spans 2 calendar years (i.e. April 2014 through January 2015), the data for January 2015 appears at the beginning of the year (so the chart x-axis is for Jan through Dec, and the Jan 2015 data is showing up in Jan (as if it was 2014, not the end of the given range in 2015). When I try with smaller time frames within a calendar year, it adjusts just fine (i.e. shrinking the window so just March-May is displayed on the graph).

How to adjust the axis so that it properly records the data range- so that it would start the axis with April and end in January, for example?

View 2 Replies View Related

Forms :: Filter By Month And Year

May 4, 2015

I'd like the user to be able to search a subform only by month and year. We have lots of reports with different days, but none of them are pertinent to searching.

I don't mind if it looks a little bit messy (such as using the calendar drop down and it discounting the day) but I'd like to have it all in one box, preferably where the user can just select ex. 05/2013 and it would filter the subform, showing only reports from that month.

View 6 Replies View Related

Custom ID With Year And Incrementing Log Number

Dec 16, 2014

Been looking around for a solution for a custom ID and can't quite find one that's specific to my problem.

I am creating a log and I want to give each new log entry a new log number. The format would be: IEyy-xxx. The ID is the letters IE, then 2digit year, a dash, then 3digit incrementing number. The ID should reset back to 001 every year (e.g. if IE14-623 is last log entry of 2014, first log entry of 2015 would be IE15-001).

My table has an autonumber that I will use as the primary key- which is not the log number- and looks like this:

These are the fields in my table:

Index Log Number (autonumber and primary key)
IE number
Program Name
Date Created

View 1 Replies View Related

Custom Autonumber

Mar 29, 2005

I am in the process of developing a DB for work. The DB is used to track incident reports and lost/found property reports.

I was interested in using 2 custom autonumbers for 2 different reports within the same DB. I would like to use the format of "I" for an incident report, "F" for the found property reports. So when I start a new Incident report it would generate the following number; "I05-03-001" The "I" specifing that it is an incident report, "05" for the current year, "03" for the current month, and "001 as the next sequential number for the reports for that month.

Does anyone have any suggestions on how I can get this done? I would very much appreciate your help.

John

View 1 Replies View Related

Restarting Custom # Each Year Using Dmax Function

Jan 18, 2007

I have been racking my brain trying to get this to work with no success :(

I have read through these 2 posts numerous times trying to apply the coding/methodolgy and can't seem to get it fine tuned.

http://access-programmers.co.uk/forums/showthread.php?t=31046&p=519211
http://www.access-programmers.co.uk/forums/showthread.php?t=112804&highlight=customid

Here is the structure I need to use for the number:

AR-CR-2007-00001

What I need is for the 00001 section to reset to 0 each year so the numbers will look like such:

AR-CR-2007-00001
AR-CR-2007-00002
AR-CR-2007-00003

AR-CR-2008-00001
AR-CR-2008-00002
AR-CR-2008-00003 etc....

I have the code working great to generate the different sections.
I have a table with 3 fields (seperating the number) and 1 field that is the combined number. The fields are:

FormatID (Text field),YearID (Text field),BaseID (Number field ) (These are populated using a form called "Test")

FormatID = AR-CR- (This is set as the default format/value)
YearID = 2007- (I have this obtained automatically using code in the default
value of the data tab) =Right(Date(),4) & "-"

BaseID = 00001 (Sequential by +1)

I have a button on the form called "Save" which I have placed this code in the "On-Click" event.
Private Sub Save_Click()
If IsNull(Me![BaseID]) Then
Me![BaseID] = Format(Nz(DMax("[BaseID]", "[tblTest]"), 0) + 1, "00000")
End If
Me![CustID] = [FormatID] & [DateID] & Format([BaseID], "00000")
End Sub

What I can't figure out is how to get the Base ID to restart with 00001 at the beginning of each year? What am I doing wrong?

I have also attached an image showing the increment change if I was to change the year to 2008 how it just incriments the last numbers instead of resetting to 00001.

View 13 Replies View Related

Modules & VBA :: DCount With Custom Fiscal Year

Jan 21, 2014

I have having an issue with determining how to use a customized fiscal year with a DCount function.

My Code:

ThisYear: DCount("*","Open Issues","year([RequestDate]) = " & Year(DateAdd("y",-1,Date())))

The code only does from Jan 1, YYYY TO Dec 31, YYYY

I'd like the code to read from Oct 1, YYYY TO Sept 30, YYYY

View 2 Replies View Related

How Do I Create A Custom Autonumber

Mar 2, 2005

I currently have a few tables that use an autonumber as the primary key, however, I would like the autonumber to start with a series of letters if possible. For example: instead of it creating an ID of 1, then, 2, 3, 4, and so on, I would like it to append lets say "ABC" to the front of it; ABC1, ABC2, ABC3, etc.

AP

View 2 Replies View Related

Primary Key...Autonumber Or Custom?

Jul 10, 2005

Just a general question...
When you make a primary key is it better to use and Autonumber or a Custom one? I have for the most part used auto...easy, convienient and well I have never had a problem yet (been pretty serious on Access for about 1 year). But I just read that ref integ doesn't work on Autonumbers? which would also mean cascading update & deleting correct?
I have looked at Northwind Access sample and all except "Customer" they use Auto. Well then to make a custom Primary field wouldn't I have to do that at the form level? like "CustomPrimKey = Left([CustFirstName],2 & Left([CustLastName],2) & [PriKeySetAtAutoNum]" or something like that to get what I want. I imagine you would automate this as opposed to letting the operator manually enter them.
And then as in the Northwind sample how do you know which tables need the custom numbering and which ones don't.
As I have learned on my own some of the "basics" elude me until they come back to bite me.

Thanks

View 10 Replies View Related

Bounded And Translated Custom Autonumber

Nov 2, 2005

I was hoping to run this by you guys to see if I'm doing anything horribly wrong. I have done a number of searches related to custom Autonumbers and I think this is okay but any suggestions/confirmations would be greatly appreciated.

I want to create a random Primary Key that will also be used as an item #. I know that in many cases this is frowned upon *but* I do not need the number to hold any significance I just want it to be unique. However I want to represent the item # as a set of 6 Hex digits so the standard Long Integer is too large. 16^6 = 16777216. No 0 index so 16777215.

I create my own bounded number with a macro (=Int(Rand(16777216-1))+1 )and put that as the default value. It is indexed and set to no duplicates. Is this correct?


When I display the field in a form or report I call a module which translates the number into Hex and appends leading zeros. I am currently having a problem where inserting a new record does not display the translated index correctly, but after it has been inserted it is fine.

If you have any comments or suggestions about how this could work even better (or if this wont work at all!) please let me know.

View 2 Replies View Related

Custom Autonumber Based On Lookup

Jul 8, 2013

Custom Autonumber based on lookup. I am creating an access database where autonumbers to be work.

I have a table with Segment Name my main table will lookup the values of segment table.

Based on the Segment I choose Autonumber has to be created

My main table to house each record (tbl_import) has the following fields:

ID
Segment
Port
MOT
TOTAL CIF

Child table - Segment contains
Development
Deployment

Testing

So based on segment field which I choose

Development autonumber has to set DEV-1001 and Deployment has to set DEP-2001, TEST-3001

My thought is if there a way to code the Segment field to lookup the segment what I choose based on the Autonumber series starts (similar to a vlookup in excel), then concatenate the DEV in the Record ID field.

View 2 Replies View Related

How To Create Reset A Autonumber After Every Year

Feb 18, 2007

Hi I am trying to make a database, In which I have a table linked with the form.
There are two fields in the table 1.Serial Number & 2. Current Year
I want the serial No. field to be incremented after every record is added & Also the numer should start from "1" again as the Current Year Changes.
Can somebody help me in this.
I am learning new things in access & not that proficient. But i love to work in access.

View 11 Replies View Related

How To Set Autonumber With Current Year As Initial Value

Jun 30, 2013

I want access to generate for me an autonumber, but with the current year as initial value. ( To give new hired employees a unique number). For example, we are now in 2013

If there a new hire, that employee is going to get a unique number 2013001

The next new hire, will get 2013002 and so on

I know how to append a table to set the initial value, but this means, that next year I will have to append a new table again to set the initial value to 2014.

I want access to do this automatically for me, so that next year a new hire will get the unique number of 2014001, the next one will be 2014002 etc...

View 4 Replies View Related

Date - Month And Year Only

Dec 18, 2005

can i change date format that contain day, month, and year to month and year only..
i try change at fromat at porperties, but it change back into dd/mm/yy at combo box..
this is bcoz i want to filter up my subform that contain parts that purchased by customer by month..

thanks..

View 3 Replies View Related

Month / Year Queries

Apr 5, 2006

I always have a problem getting this to work without a lot of effort and I know it should be easier than I make it out to be. Problem is say I have a bunch of records I need to summarize by month. Say Dec 05, Jan 06, Feb 06, etc. When I bring down the date col, I do something like:

Format([date],"mmm - yy")

And do a totals query with a second col that returns say a count for each period. This works fine except that when I sort I get Dec 05, Feb 06, Jan 06, etc.

How can I do this with out having to create a third col to do the sorting stuff? Should I somehow wait until the data gets to the report to do the date format stuff???

:confused: :confused:

View 1 Replies View Related

Month End And Year End Reports

May 1, 2006

For the record, I have indeed searched the forum for help with this, but no luck so far, so here goes. (C++ programmer, little background in access).

I have a table that stores a person's name, gross amount spent, gst spent, pst spent, and total amount spent.

I need to be able to create a query or something that asks me to enter a year, and it will sum up the amounts, gst, and pst over the course of that year, and print it neatly on screen.

Also, I need to be able to create a similar query that asks for a year and a month (does access possess Java's ability to easily create a pop-up calendar applet-like instance that provides a GUI for selecting months/years, or does the data need to be entered through a command prompt?) which will create a month-end report in the same manner, but only spans a 1 month period?

Any information that could be provided to me, even a means of getting started on this problem, would be great. Thank you and cheers everyone!

View 2 Replies View Related

Distinct Month AND Year

Aug 28, 2006

if i have a table like this:

4/3/2006
4/3/2007
4/12/2006
4/12/2008
5/2/2003
5/5/2003

i would like to extract only the distinct month and year date, so my query should return

4/12/2006
4/3/2007
4/12/2008
5/5/2003


can anyone plz help me with the sql query? thanks

View 2 Replies View Related

Grouping By Month & Year

Jul 22, 2007

I have another...

How do I group the dates on my query to show only a certain month and year?

View 2 Replies View Related

Return Month And Year

Aug 14, 2007

Hey all, I have a form that has two textboxes, one box is for month and the other is for the year. After I enter the month and year I want, I click on a command button that previews a report. Well, the report is not giving me the information for that particular month and year, actually it gives me nothing.

The report gets its information from a query. In that queries criteria field is the below expression that I have.

Like [forms]![frmPEL]![cboMonth] & "/*/" & Right([forms]![frmPEL]![txtYear],2)

Can anyone see anything wrong with this? I should be able to enter the month and year and click on the report button I want and preview that report, but no joy.

Your help is greatly appreciated.

RR

View 5 Replies View Related

Calculate First Day Of Next Month In Following Year?

Jul 30, 2012

I have tried to do this using DateAdd but I cant get it to add both the month and year.

I have a date field [HireDate] and I need to add one year then get then get the first day of the next month.

For example: HireDate = 1/15/2012 - I need access to return 2/1/2013.

how to build that expression?

View 4 Replies View Related

Grouping Date By Year And Month In ADP+SQL

Feb 19, 2007

Hi all.

I have chart in ADP project/MS SQL Express and I want to see in chart table (date Field, data field) grouped by year and month: 2005.01, 2005.02, 2005.03....
I try this str = DATENAME(yyyy,date)+ DATENAME(m,date), SUM(data) FROM table GROUP BY DATENAME(yyyy,date)+ DATENAME(m,date) ORDER BY DATENAME(yyyy,date)+ DATENAME(m,date)

problem is with sorting: 2005April, 2005februar,2005,Januar - its sorting not by date, but alpabhetic.

Please, help with other grouping way!

View 2 Replies View Related

How To Extract Month & Year Together From A Date

Apr 19, 2007

Hey guys.... stucked in one thing..... I need to extract Month and Year together from a date in a Query. for example if date is 4/19/2007 i want to put this as April 2007.

Any idea ...?

thanks

View 5 Replies View Related

How To Get Year And Month Value From Date Field

Aug 16, 2005

hi friends,

I want to get year and month field of datetime field so that i can get data by comparing them with other table fields.

ex: date field column contains 1/28/2005 as data
how to get year(1/28/2005)
how to get month(1/28/2005)


expecting your help

Thanks,
Spec

View 3 Replies View Related

How To Format Date From Year Month And Day?

Aug 20, 2007

I have a table a
year month day
2005 1 1
2005 3 1
2006 5 1
I want to generate the associateed
1/1/2005
3/1/2005
5/1/2005
which funciton I can use to do that?

Jeff

View 3 Replies View Related

Display Month And Year On Form

Sep 5, 2005

I have a reports form where the user can enter enter a from date and to date for the report criteria. I have an unbound field on the report which i want to display the month and maybe the year in which this date criteria is in. This will be needed to display on the actual form. Say if the date range is between 01/01/05 and 31/01/05. I need the field to say January 05.

Hope this makes sense and can be done

View 6 Replies View Related

Month & Year Drop Down Menu?

Mar 13, 2006

I have a field that is:

Current length of continuous allocation of Care Co-ordinator. ( years and months )

Ideally I would like to have two drop down menus - one with years and one with months.

Would I have to have two fields in my table - one for years and one for months or can I have one?

Whats the best way?

Thanks.

View 3 Replies View Related







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