Forms :: Generate Autonumber For A Group Of Records
Aug 5, 2014
I've got a table, where each record is a group of students. So the fields include Student1, Student2, Student3, etc. I know this is bad database design, but I've done this because I want the group number (primary key) to be automatically generated.
Now, I want to add more information for each of these students as if they're seperate records but I also want an autonumber for the group.
View Replies
ADVERTISEMENT
Feb 4, 2005
Hi all,
here's me again,
I have a question, I'm trying to generate an autonumber but of 4 digits, for example
the first one is: 0001 and autonumber 100 is: 0100, and so on
how can I do that?
any help will e very much appreciated!
Best Regards
CS.
View 4 Replies
View Related
Aug 3, 2011
I have made a database for a repair workshop, where you book in and book out repairs.
I am having a problem as we need to make a Dispatch Note daily with a list of all booked out repairs for that day and for that branch.
This is all working so far. However, we need to generate a reference number using AutoNumber (Wshop0001, Wshop0002, etc) and keep a record of this - how can this be done with keeping ONE reference number per day per branch?
View 14 Replies
View Related
Dec 10, 2013
Autofill text field using combo box selectionHello,
I'm trying to autofill a field on a form using MS-Access 2010 Web version sharepoint using macros without coding.
The form has an existing Combo Box field called Segment, using the row sources "REW", "WTT", "DBM".
A user begins filling out the form and eventually selects the Combo Box for Segment and selects any one of the segment no Multiple selection
There is another text field, which is actually alpha-numeric, called Job_No. I want this to autofill based on their Segment selection, using this format:
REW-YYMMDD-TTTT, or REW-131210-20001 for example, for today with the time displayed as military time and last Job No.(20001) for REW and Also for WTT (30001) as starting number.
View 1 Replies
View Related
Oct 28, 2013
I need to build such a report, Unfortunately, I do not know how to use VBA to create each group (grouping by type) had a different header.
The problem becomes bigger that everything must generate queries dynamically cross, the number of columns in a given type may vary depending on the number or the size of the products in which they occur.
View 8 Replies
View Related
Aug 8, 2013
I'm developing a database where people basically can fill in an order form and then the database can track if the order has been placed, when it came in etc.I have a form called frm_Suppliers to be Ordered that runs off a query. The tables that relate to the query are called tbl_Products, with a primary key called ID and tbl_Suppliers, with a primary key called Supplier ID.
The form called frm_Suppliers to be Ordered, shows a list of suppliers that have open orders. Each supplier may have several orders open. I want to be able to click a button after each supplier name and bring up a continuous form that relates to all the records from that supplier that have open orders.
I have tried using the code found in the thread called "open a form based on the record that is selected in current form" from 06-08-2011, however it will only work when my form lists each open order separately, not when they are grouped by supplier.
View 2 Replies
View Related
Sep 20, 2014
I have a report which gives me a count of records found for each group
group 1 - 10
group 2 - 13
group 4 - 82
what i want is a total below this - ive looked at calculated controls however cant seem to get it what soever - I've tried likes of =sum([counts])
View 1 Replies
View Related
Jan 21, 2014
I have a form [IUDATA]
I have a add record button.
I have a date field [DATEIN]
I have a text field [DRPNO]
If the [DPRNO] field is empty, I would like the user to have the [DPRNO] field be automatically populated after the user enters a date.
I'd like the format of [DPRNO] to be "dpr YY-XXX"
Where:
YY is the year of the [DATEIN] field and
XXX is number of records in that year.
So for example, if it was the 4th record with a 2013 date the [DPRNO] would be dpr 13-004.
View 12 Replies
View Related
Aug 4, 2005
While there are lots of detailed issues discussed and resolved here, my problem is at a much higher level. Here's what I want to do.
I want to generate records in a file based on the user entering some 9 different values. The first two values will be used to get records from file A (they are a partial key). The values from the records in file A, plus the other values entered by the user will be used to generate records in file B. I hope this is clear enough.
I have created a query which prompts the user for each field and does the job just fine, but I want to replace the 9 individual prompts with a single form which allows the use of combo boxes for the partial key and a date picker for the single date field.
I've fluffed through creating a form with unbound controls to suit and even worked out a form of cascading combo box for the partial key, but I am struggling to find the best way to make a button at the bottom generate those records.
A nice optional would be to then display the added records (i.e. another query I guess).
Can somebody give me some pointers as to how to approach this? I've done very little in the way of Access programming, being mostly an SQL guy.
Thanks.
View 3 Replies
View Related
Aug 7, 2015
The following is code to open a form and records with a specific date as input by the user:
Private Sub cmdDisplayCovers_Click()
On Error GoTo Err_cmdDisplayCovers_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInventory"
stLinkCriteria = "[tblCovers].[Date] = [Forms]![frmCoversByDate]![txtDate]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
etc. etc.
generate a message to user if no records match the input and then return to the input form. Currently, the form opens even with no records.
View 1 Replies
View Related
Nov 5, 2013
I have a table called bookings, three records within that table are;
arrivaldate
departuredate
breakfast
This Table (Bookings) is linked to the guest table via GUESTID..Assuming that a guest arrive on the 5th and leaves on the 10th, I am trying to create a breakfast voucher for the guest for each day of their stay.
So 5 vouchers, 1 each for the 6th, 7th, 8th, 9th, and 10th.I have created the breakfast voucher as a report and a query to include data but I dont know how to propagate the new data to actually create the vouchers. All I can get is data for the arrival or departure fields.
View 2 Replies
View Related
Jul 25, 2013
I stumbled upon the Option Group function just yesterday and, happy as a clam, I created a group with 2 options in radio button style. I assigned the values to a field called Registration_Type as the 2 options are "Confirmed Registrants" and "Prospective Attendees".
[Great. That part works well. When I look at the table, a 1 or a 2 is in that field so it's great to know how to control accidental ticking of radio buttons (previous 450 records or so didn't have this option group functionality so one might easily tick one of the buttons. So one part of controlling option group I know I can handle via the table itself for now.]
The challenge is how to ensure the user always ticks one or the other ... I went back to the main table and tested the 'required entry' option for the Registration_Type field but forcing an action like this is not ideal in my mind. The usual error message vagueness for the average user is no good and I don't want to limit the user so much.
Is there a way to simply have a popup come up warning that neither radio button was ticked? Perhaps something linked to the form - i.e., maybe "after update"?? I only learned about attaching code to before and after update on controls a couple of days ago, so not sure if this would be best approach.
Just something to let the user know that nothing has been ticked in the option group as that controls in which of 2 reports the data will show up in so any record not ticked might mean a registrant being left out, which would be rather disastrous <g>.
View 1 Replies
View Related
Jan 25, 2006
quick question guys...
if i have a sales order that the sales order # is an autonumber and i manually delete the records my next new record still follows the last number i had before that is now deleted..
example
sales order 1001
sales order 1002
if i delete all the records on the table and clean it all out
the next new autonumber will be 1003...
i want it to be 1001 again...
and yes its set to an index of no dups
View 1 Replies
View Related
Jan 25, 2006
quick question guys...
if i have a sales order that the sales order # is an autonumber and i manually delete the records my next new record still follows the last number i had before that is now deleted..
example
sales order 1001
sales order 1002
if i delete all the records on the table and clean it all out
the next new autonumber will be 1003...
i want it to be 1001 again...
and yes its set to an index of no dups
View 1 Replies
View Related
Apr 27, 2007
I apologize if this has already been covered, but I could not find an answer.
I have a form that assigns a quote number (autonumber) and for somereason everytime you enter a new record it enters two. So for every data record there is one empty record.
i.e.
2473 - blank
2474 - has data
2475 - blank
2476 - has data
Thank you for your help.:confused:
View 3 Replies
View Related
Aug 20, 2013
A slight flaw in the design requires this change. What is the best way to do it?
View 8 Replies
View Related
Dec 4, 2005
Hi,
I've got a database containing three tables:
=====================
tblEvent:
---------------------------
Id (PK) | Event_Title | Event_Price
=====================
=====================
tblDelegate:
---------------------------
Id (PK) | Delegate_Name
=====================
=====================
tblBookings:
---------------------------
Id (PK) | Event_Id (FK) | Delegate_Id (FK)
=====================
I need to output an HTML table with the following headings:
==============================================
Event Title | Event Price | No. Delegates Booked | Total Price
==============================================
How do I group(/join?) the tables to show this data? I'm confident with doing the recordset stuff, it's just that I have no idea how to build a SELECT string, with data grouped into events where the total number of delegates who've booked on that event will be added together.
Does this make sense?
Any help would be much appreciated, thanks!
View 6 Replies
View Related
Apr 10, 2006
Hi,
Does anyone know of a way to dynamically fill the content of a form at runtime. I want, for example, when a user clicks a button, a textbox is dynamically added (but I would prefer not to use hidden objects). I've tried the "CreateControl" option but I can't seem to get this to work. Any coding examples would be much appreciated.
Thanks,
Mark.
View 4 Replies
View Related
Jun 9, 2015
I have a form "Member's Details" that has a few tabs. One tab is titled "Deacon Families" and I want to be able to either lock it, or grey it out, or something along those lines base on if the member is a deacon or not (I do have a yes/no field asking if they're a deacon). If they are NOT a deacon, the user should not be able to open the tab (because there would not be any information to show) and a pop up saying something like "This tab is empty because the member is not a deacon". If they are a deacon, I would like it to show all the members who have been assigned to them. I know this needs to be done in a subreport, but I don't know how to set it up. There is a deacon table which is linked to a family table which is linked to the member table, but the member table and deacon table are not directly linked.
View 10 Replies
View Related
Jul 30, 2012
I have a database in which the year is stored in a table called year with as laid out below
"YearID" autonumber field and the
"Year" field which is a date field.
I am trying to search for records via a query for just the current year, i.e. the highest autonumber and I am having no success.
View 4 Replies
View Related
Oct 29, 2012
We're developing a database to manage tournament registrants as well as event results.
The key tables we have ar:
ContactsRegistrationsRegistration DetailsTournamentsAgeGroupsBreakingAgeGroupsExperienceGroupsEventsPayments
There are queries for using information in the tables to determine age, competition divisions etc.
At the moment the RegistrationExtended query, which uses the ContactsExtended and TournamentsExtended queries and the Registrations table to determine the number of events for each registrant as well as what division and age group they are assigned. This is done with some IIF expressions.
For the 2012 event we had 4 division classes based on experience and 6 age groups. For 2013 there might be more division classes and age groups. So now I have the tables AgeGroups, BreakingAgeGroups, and ExperienceGroups. The two age group tables have a query that calculates the age group name based on the values in the MinAge and MaxAge fields. For example 8 & Under, 9-11, 12-14 etc. The ExperienceGroups also have a minimum and a maximum field but only one field will be completed for each experience level. If the value is a maximum then that would be for those with less than the maximum experience and if the value was a minimum then that would be for those with minimum of that many years of experience. For example Grasshopper for less than 1 yearWarrior for those with 1 year to less than 2.5 yearsSamurai for those with 2.5 years and less than 4 yearsShogun for those with 4 or more years.
We want to maintain the history so the age groups and experience groups are now tied to the tournament.
I'm think that I'll need some VBA code that will compare the registrant's tournament age to the ranges assigned to that tournament and will assign them to the correct age groups. Then there will be code to compare the registrant's experience and assign them to the correct division class. The key here is that each year might have a different number of age groups and experience groups as well as different experience group names. For instance in 2013 we may change the 8& Under group to 7-8 and add a 6 & Under group and we may add another level called Emperor for those with 20 years or more experience.
View 12 Replies
View Related
Feb 9, 2015
how I would write a code that will recognize information by same “ID” and then only take the first 6 years of that information. Each row has an ID and a corresponding year with other information associated with it. The data looks similar to this:
ID Year Avg HR
JohnSmith 1988 .789 78
JohnSmith 1989 .854 85
JohnSmith 1990 .456 85
TomJones 1978 .465 56
TomJones 1979 .165 85
View 9 Replies
View Related
Dec 26, 2014
I am building a form that updates a query and then generates a report based on the updated query. I am having two problems;
1. I have successfully concatenated the "First Name" and "Last Name" fields in the query to appear as First space Last, but in the actual report I get a compile error. I've tried everything I can think of with no luck. This is what it looks like in VBA:
"SELECT [VoCSurveys].[First Name] & " " & [VoCSurveys].[Last Name] AS Name, ... " & _
2. I am trying to figure out how to update two labels (lblDescription and lblSecondaryDescription) on my report with the information the user types in the text boxes (txtDescription and txtSecondaryDescription) on the form. I tried calling a variable for each label and setting it equal to the corresponding text box, but I didn't think it would work and I was right.
View 3 Replies
View Related
Jun 10, 2015
Ok so I want to generate a subreport for my deacons that show what families have been assigned to them.
Using the wizard I created a subreport that pulls the name & phone number(s) for each member with the same family ID, and Deacon ID (which pulls the name, number and FID from the member table, then checks the family table and gets the deacon ID). My question is, how do I tell the report to check if the current member I'm looking at is a deacon and if so use their deacon number as the reference number for "Deacon ID"?
I have a table for my deacons that links the member through their EnvNum (if they're a Deacon). Not sure if I'll need that table for this, but thought I'd mention I do have one.
View 2 Replies
View Related
Jun 25, 2013
I have a database with a table name tblTeachersProfile and a report format based on the table. I also have a form with two combo boxes name cboState and cboCounty base on field from the table and a control button called Get. Now, I would like to make selection from the two combo boxes and generate a report after updating both combo boxes based on my selections.
This is what I have but it is not working: For my Get button
Code:
DoCmd.OpenReport "rptInServiceIndividualSchoolAndTeachersInformation", acViewReport, , "strCounty = '" & Me.cboState & "'" And "strDistrict = '" & Me.cboRegion & "'";
View 14 Replies
View Related
Apr 24, 2006
is there a way to count - in one query - the number of records that fall between specific times:
Time CountOfRecords
0000-0100 7
0100-0200 2
etc
2300-2400 4or do i have to do separate grouping queries then separate counting queries for every hour of the day? a crosstab? something else perhaps? feels like i'm missing something obvious (i hope...).
View 2 Replies
View Related