Hi all, and apologies for starting a fresh thread about this, but I can't find exactly what I'm trying to achieve via the search function, although I'm hoping it's just something simple I'm missing.
I have a small database that allows the user to click on a button to go an Add New Records form, which they then fill out. At the moment, the record number gets autofilled and they start entering details. However, one of the details they must enter is a unique record number, consisting of the month, the year, and a number between 01 and 99 (so the first new record created today, for example, would be record 090601, the second 090602, etc. The first next month would be 100601, and so on).
At the moment, I have to rely on people to manually enter this number, which requires them to view the current records first to ascertain whether there have been any previous records created that day (to prevent duplications).
What I'd really like is to have the this records box autofill when entering the form with the current month, current year, and then the number of the record for that day. However, it should automatically look at the last record created, and, if there's a match on the month and year, add one to the last 2 digits to ensure a new, unique record. So, for example, I have three records this month, listed as numbers 090601, 090602, and 090603 respectively. I go to create a new record, the box should autofill with the number 090604 and create a new record accordingly.
I am sure this has been asked a thousand times, but I couldn't seem to find a thread.
I have a form, which contains a subform. When in the subform, I have a button to create a new main form and I want it to prefill in the data from some fields on the subform.
It looks like it should work, but #1, when I am in the main form inside the subform, the botton does nothing. If I open only the subform, then it at least works.
And #2, it definitely captures the values that I want, but it doesn't fill them in on the form.
Here is my code: Private Sub Command44_Click() On Error GoTo Err_Command44_Click Dim doc As String Static tit As String Static desc As String doc = "Business Requirement Document" title = IssueType desc = Issue
I'm VERY new to MS Access 2010 - in fact, I used some online youtube videos to get me started with the database I'm currently working on.
Here's what I have so far: 2 tables, one for customer information (name, phone, addy, etc) and one for invoices (inv #, customer ID (which should be the same as my primary key from the customer info table), phone, services rendered, etc etc)
I'm currently working on a form for Invoices, where I can simply put in the customer's name, date, cost, etc without having to look up the ID# and phone number for every time I use it.
I have a table that keeps putting a zero value in the new recordl. It was previously an autonumber field. I changed that and deleted the zero from the default value property.
Hi there! It's been almost 10 years since I've done any work with databases, so I'm really REALLY rusty and I barely remember how to do anything. I was wondering if you guys could help me out with a question I have in making a form. I have 2 tables. The first table has a list of names and ID's. There exist some duplicate names, as some people are associated with more than one ID. And there are two fields to the ID. One is Called the Client Code, and the other is the Client Division. So the 1st table, in datasheet view, is basically:
# | Last Name | First Name | Client Code | Client Division
The second table is a list of addresses based on Client Code and Client Division:
---- What I'm trying to do is the following: I'm trying to create a form such that as I'm typing in a last name, it does autolookup and auto filling. I may have multiple people with the Last name of Smith, so then it dynamically creates a dropdown box with all possible unique first names associated with the last name Smith. And after I choose/type in the first name, I get to two more dynamically created drop-down boxes that list all possible Client Codes and Client Divisions associated with this name. After choosing that, I figure it's a simple autolookup to populate the address fields. Does anyone have any insight on how I can get this done? Another piece of functionality that I'm trying to work into this is that if the name doesn't exist or if there's a new Client Code and Client Division or a new address, the data gets automatically added to the respective tables.
Does anything of what I wrote make any sense? Any help would be greatly appreciated.
I am creating an Access program for logging in Parcels that are delivered and I am having some problems.
I have a Table called 'Contacts' and within this there are 4 Columns: 'Names', 'Departments', 'Extensions' and 'Emails'.
I also have a Form and there is 1 Combobox and 3 Textboxes relating to this Table: 'Addressed To', 'Department', 'Ext Number' & 'Email'. (see http://c0ld.homeip.net/parcel_log.jpg for details).
What I would like to do is select the Name from the Combobox (Addressed To) and the have the other Textboxes (Department, Ext Number & Email) get auto-filled with the corresponding data that’s within the Table for that Name.
If anyone would like the .mdb for this, please PM me.
What's the formula we can use to calculate days between no of days between date job is open and today's date in a query. I am using formulat below formula but the DATE_OPEN and Today (todays date) pops us as enter parameter value. I dont want those enter parameter windows pops us. The date job is open is in a linked table and linked table is getting the information from BPCS software. The date in Liinked is in format YYYYMMDD.
Total Days: DateDiff("d",[Date_Open],[Today])
The SQL Details are below. AUNPRDF_AAA802 is a linked table and information gets updated on 12 am everyday
SELECT DateDiff("d",[Date_Open],[Today]) AS [Total Days], AUNPRDF_AAA802.AAAGE AS Age, AUNPRDF_AAA802.AAORD AS [Job Number], AUNPRDF_AAA802.AAWKSP AS Workshop, AUNPRDF_AAA802.AASWKT AS WorkType, AUNPRDF_AAA802.AANAME AS [Customer Name], AUNPRDF_AAA802.AANME AS [Service Admin], AUNPRDF_AAA802.AASDE1 AS Complaint,
- A table with a number of fields about a course - A course commence date - A number of days the course will take field - No course end date
Is there a way to easy add one field to the other to: Give end date i.e. do I need to write the code to validate all dates which bring the date over a month e.g. start date 29/sep/2007 and number of days 5.
I would like to convert a date field to a number in a query. What I am trying to do is take 2 date fields and see how many days they are apart. For example if one date is 3/1/07 and the other is 3/1/06 I would like 365 days to be returned. Thanks for any help!
My challenge is to fix a broken report that results from a query. The query is suppose to bring up all records within a date range. The problem is that the table was designed with the date field being text. Dates such as 06/12/2006 are entered without the beginning 0, so simple queries do not work, and the data is simply 6122006. I think the data needs converted to date first, possibly by extracting and converting. I do not know how to do this because of the missing digit inconsistency. The table cannot be changed directly to a date field without data loss.
I have a query the result of which provides me a date field in the format 12-Oct-2010.I want that this field data to be converted to corresponding numbers such as 40463.
i would like to display the date and week number on one of my forms but have no idea about dates and how to code this. can some one help? id appreciate it it beyond me :confused:
I am trying to make a query that finds all records by the "Month Number" and have problems.
What I did: Month(DateField) I got month numbers like I wanted but when I typed in the criteria below, I got February thru December Records, but when I search on anything "up to" 9 it works fine.
I want: Between{month1] and [month2] Month1= 9 (example) Month2= 12 (example) Need results to be from the requested months but any year
I have to imagine it's how the date is converted to an integer, but not sure.
I would appreciate if someone could help on this problem. What I want to do is to add a field in a form that would automatically show the date of person's birth after entering the persons ID. For example, I enter 39101012345. The first number (3) shows only the gender so I don't need it. The next 6 numbers show the date of persons birth - it is 910101 and it means that the birthdate is 1991.01.01 I need this field in a date format because later I will have to do some calculations concerned with the birthdate of that person.
I have a table that tracks different events and the actual date they occurred. I am trying to write a query that counts the number of each event that occured by month. One issue I am having is if an event had no occurrence during a month I want to return 0 raher than no data for that event.
I have a query that I want the Now() function in the year only format and in an expression combine with the auto number one extra field to get the following:date YYYY-------Autonumber---------color----------exp1: ---2007--------------23--------------green-------2007-23-greenThanks for the help