Forms :: Filling Holes In Primary Key Field?

Aug 5, 2014

I've imported some historic user data from some spreadsheets and I have a field which is a unique PIN code for each user. This is set as the primary key on my new table. Duplicates are not allowed. It's a text field with values ranging from 0005 through to 9576. The maximum allowed range of values will be from 0001 to 9999. There are currently only 300 records in the table so as you can see, there are lots of PINs available for use.

I'm building a form to allow a new user record to be created and want to automatically allocate the next available PIN. So if I was entering a new record now, the PIN to be allocated would be 0001.

how I can create an event for creating a new record that looks up the next available free PIN.

View Replies


ADVERTISEMENT

Forms :: Filling Field With Date When Record Has Been Modified

Jul 20, 2015

How do I set up a field so that when the record has been modified, the field is automatically filled in (or replaced) with a date? In other words if I open up my member's detail form, and go to Sally Smith and edit her information on 11 July 15, that date is saved into a field called last modified and then updated every time I go into her file and edit & save it.

View 2 Replies View Related

Forms :: Multi-field Primary Key And Subform

May 16, 2014

My Db has a master table with a two-field primary key.

I have a main form, based on a query that primarily grabs data from that table.

The form has a subform based on a table which is the "many" side of a one-to-many relationship with the master table. I'm having a problem adding individual records to the subform.

The subform is linked via Master/child fields to the main form, but only on one of the two fields comprising the PK. When I add a new record in the sub it does not pull the PK data to the FK fields in the sub table and I suspect it is because of only having one of them properly linked.

The subform relates to an annual certification process that we track with vendors. The sub-table is populated each year with the two FK values for all qualifying vendors in one go. If I then need to add a single certification record for a single vendor I want to have a button on the subform that will pull the values from the main form fields, and ask the user for the cert year.

I tried adding a new record in vba via

Code:
Private Sub btnAddSingleRec_Click()
Forms!frmMainForm!subfrmCurrentProcess.SetFocus
DoCmd.GoToRecord , , acNewRec
DoCmd.OpenQuery "qryAddSingleCert"

with the query being an Update query with the following in the Update To line and "Is Null" in criteria:

Forms!Mainform!PKField1
Forms!Mainform!PKField2
[Enter Cert Year]

This doesn't throw an error, but the Access warnings say I'm updating 0 Rows.

View 4 Replies View Related

Forms :: Find Record By Multi Field Primary Key

Jul 31, 2014

I have a form that has a FIND button. I want the user to enter the 3 fields that make up the primary key, then find the associated record. How can I do this in Access - not VBA?

View 1 Replies View Related

Forms :: Display Description Field Instead Of Primary Key In Datasheet Of Split Form

Aug 8, 2014

I have a split form on my database where I have my combo boxes bound to a primary key but they display the description field so it's much easier to understand. Is there a way to do this with option groups? In other words, I would like the datasheet part to display the option group labels rather than the values so it is easier to understand.

View 1 Replies View Related

Auto-filling A Field Based On Entry In A Separate Field

Jul 17, 2015

I am creating a database tracking physicians and their contracts. I currently have two tables: PhysicianT and ContractsT, with corresponding forms to enter information in them. I have an issue with the Contracts form; I want to be able to select a physician from a dropdown list (looked up from PhysicianT) and have Access autofill their Physician ID #.

PhysiciansT looks like this:

physicianID (AutoNum) name (Calculated)
1 Barker, Bob
2 Burgundy, Ron
3 Stark, Tony

Upon selecting Barker, Bob from my dropdown list, I want "1" to appear in the Physician ID # field in my Contracts form.

View 3 Replies View Related

Filling A Field

Nov 14, 2007

Hello!

What I am trying to do is fill a field with a date until a new date is encountered. Basically, I have imported some csv data which only has the date when it changes. I have created a new field and have a row with only the date in it. Is there a way to fill the rows below the date row with that date until the next date row is found and then continue on with the next date and so on. Here's what the database looks like, basically:

Date Field1 Field2 Field3
01/01/01 null null null
null DATA DATA DATA
null DATA DATA DATA
null DATA DATA DATA
null DATA DATA DATA
01/02/01 null null null

Hopefully this makes sense and someone can give me a hand with this! Thanks so much!!

View 14 Replies View Related

Automatically Filling A Field

Jan 25, 2006

This is probably very simple to do, but, I am most likely missing the obvious...
I have 3 fields,
UnitPrice,
NumberPerUnit, and
NumberPerUnitCost.
I would like to have the NumberPerUnitCost field filled automatically based on what I have entered into the other 2 fields. I would also like to have this saved in my table as I will use this single unit cost when calculating some production costs.
Any and all help would be appreciated. If I am going about this the wrong way, please redirect me.

Thanks, Karen

View 3 Replies View Related

Automatically Filling Values In A Field

Feb 2, 2006

Hi eveybody,

I have 10 fields in a form where I put in years.
is it possible that if the first year is filled in as 2006 (for
example) that the next nine years fill up automatically as 2007, 2008, ......etc.

How would I do it?

Thanks

dfuas

View 7 Replies View Related

Filling In A Text Field With Data From Another

May 8, 2006

This is simple Access but I am quite simple so help would be cool
all I want to know is how to put text from one field into another, but not every time.
lets explain
I have an order form and two fields , one date booked , and one date requested.
if date booked is empty I want to copy the info from date requested to it, if its full I want Access to say its already booked.

its porbably something along the lines of where datebooked.txt = "nothing" then datebooked.txt = date requested.txt or something like that anyway

View 1 Replies View Related

Filling A Null Date Field

Mar 27, 2006

So I went searching through the forums and found a thread that provided coding for getting the # of years and months from two dates:

Function fAgeYM(StartDate As Date, EndDate As Date) As String
'Purpose: Returns the difference between StartDate and Date in full years and months
'To call:
' ? fAgeYM(#1/21/04#, #1/19/06#)
'Returns:
' 1 years 11 months

Dim intHold As Integer


intHold = Int(DateDiff("m", StartDate, EndDate)) + _
(EndDate < DateSerial(Year(EndDate), Month(EndDate), Day(StartDate)))

fAgeYM = Int(intHold / 12) & " years " & intHold Mod 12 & " months "

End Function
------------------------------------------

That's perfect for what I'm wanting but I'm doing it with Hire/Term dates. So I want to be able to see how long past and present employees have worked in the company. Obviously that makes the Term field Null at times. With the coding above it requires a date to be in the EndDate field. How can I change it to allow for a null field in which the field would essentially be the current day's date? [Now()]

View 5 Replies View Related

Filling A Table Field With A Query Result

Nov 23, 2004

I have a query_ReimburseResult
that counts the yes/no answers in field Reimburse from tbl_Survey.

How do I take the results from the query and put it into a field in another table?

I have tbl_Result and a field called ReimburseResult. I set the type to long integer and then what?

thanks!

View 2 Replies View Related

Auto-filling Fields Based On Another Field

Dec 7, 2004

hi all...

i am the biggest of all newbies when it comes to access and understand only the graphical parts of the process (no SQL knowledge etc.).

how would i go about auto filling a certain field based on what's in another field? for example, i have a field called TimeZone that i want filled with either West, East, Central, or Mountain based on another field for State. can i build a query to automatically take care of any empty fields for TimeZone that haven't already been filled out by me manually?

if i need to use SQL, that's fine too as long as the directions are clear and precise as i have no prior knowledge.

thanks a bunch.

View 4 Replies View Related

Limiting And Filling Fields Based On Another Field

May 1, 2014

The database I am building is for Student & Alumni administration at a non-profit culinary school. In the various forms for entering student information and for defining tests and recording test scores, I would like to not have to re-select things like Class Number or Test number.

I was able to use the Test Number field as Link Master, Child in a Test Results sub-form where Test Parameters is the Master form. But I am not able to link with the Class Number, getting the error message: "The setting you entered isn't valid for this property" even though it is one of the Suggested Link Fields. The form record source is a query linking the Class Table, Test Parameters, Test Results and Students.

I noticed that I can eliminate both Class Number and Test Number from the sub-form. In the underlying query, both these fields are updated. However, the underlying Test Results table does have the Test Number but not the Class Number. While there is still a "queryable" link from the student to the Class Number, I would very much want the Class Number to be stored in the Test Results table.

Is there a way to accomplish this through the sub-form Link Master/Child property or any other/better way to inherit both the Class Number and Test Number in each Test Results record entered?

View 4 Replies View Related

Pre-Filling Forms On Web Sites

Feb 18, 2005

Is it possible to write an event procedure attached to a command button in a Microsoft Access database that would use data from an established query to pre-fill data in to a form on a web site? Has anyone tried this?

View 3 Replies View Related

Queries :: Filling Blank Field Into All Records Of Database

Nov 22, 2013

I am working with an inherited database. When this database was created, a large amount of data was imported. Over the course of time, I have added additional fields for tracking information. One such field is "Date Started."

Unfortunately, there are almost 500 records without this information and that is skewing some report results.

I would like to do is insert the date of 9/9/1999 into all records that have no data in this field. (This date is well before the creation of the database and would serve to indicate old records, whether or not they are still active.) Copy and pasting isn't working, and I can't do a find and replace, since there's nothing to find.

View 1 Replies View Related

Forms :: Filling Textbox With Email IDs

Jun 11, 2014

I am building a form where user can send emails from the form. I have bound eTextbox (Textbox) with email ids (around 40 email ids) and bound check box (ChkEmailSelect) to select the email id in frmEmailSelect. It is a continuous form. I wish to add the check marked emails in another form (frmEmail) in a textbox (TxtTo) with ";".

Table Name: tblEmails
Email Field Name : SendTo
Checkbox Field Name: SelectToSend

View 3 Replies View Related

Sychronised Combo Boxes And Filling In Forms

Aug 6, 2006

Hi All,
Totally new to access, been asked to make a database for a historical society. To make life easy, in descibing the hist. society's numerous items, I thought it best to follow the standard museum catalogue naming system, i.e everything has a primary and secondary classification. So what I have done is create two combo boxes, with the choices in the 'secondary' classification field limited by the choice in the 'primary' combo box. These controls are based on two tables that contain only the names/info on primary and secondary classification. It works nicely. However, because these controls are on a data entry form, when you make your choices in these combo boxes, the data is not recorded on the appropriate data table (presumably as the controls are linked to those other tables). Everything else you type in the form (like the item's location or autonumber) is saved in correct table.
Other problem is that every time you go to add a new record, and change the primary/secondary choices, it changes all the records on the form to equal these choices.
How do I fix it, or is there nothing I can do (as it may be totally impossible - I don't know!)??

Any help greatly appreciated, but please talk very simply and slowly - I am a complete novice!

View 3 Replies View Related

Forms :: Drop Down Box Auto Filling Other Entries

Apr 26, 2013

I've created a drop-down box on a form, that allows a user to choose from three names.

However, when I choose say name A, it then populates all the other entries with name A.

For example:

record 1 has name A
record 2 has name b
record 3 has name a

if i then enter a new record, and enter name C in it, it changes records 1, 2 and 3 to show name C too.

is there a setting i need to change or something?

View 1 Replies View Related

Forms :: Textbox Control Not Filling When Default Value Is Set

Jul 28, 2015

I have 3 tables, tblClients, tblClientDetails, and tblSchedulingDetails.

I have a field in tblClientDetails to contain the client number from tblClients, and I have two fields in tblSchedulingDetails to contain the client number and the client details number.

I then created a form that holds most of the fields for all of the tables mentioned above to enter new client names, new client address info, and basic client scheduling info.

Now, I have set the default values using the property sheet in design view for the following:

ClientNum > ClientNum_tblClientDetails and
ClientNum > ClientNum_tblSchedulingDetails and
ClientDetailsNum > ClientDetailsNum_tblSchedulingDetails

I promise this is not a riddle...

Here's the quandary - ClientNum_tblClientDetails is autofilling from tblClients, and ClientDetailsNum_tblSchedulingDetails is autofilling from tblClientDetails, but ClientNum_tblSchedulingDetails is not autofilling in spite of the fact that the default value is set with =[ClientNum].

I then created a modal dialogue form with the fields from tblClients and tblClientDetails with a command button that opens another modal that contains the fields from tblSchedulingDetails, set the appropriate default values, and the ClientNum_tblSchedulingDetails autofills as needed.

The question at hand is, why do I have to use modal dialogue forms to perform this action and cannot do it in one single form?

View 1 Replies View Related

Forms :: Combo Box And Auto Filling Fields

Jul 6, 2015

MS Access 2010

I have a form "Admin" used to create new records in a table "RCJ"

I have a table called "Projects" that contains detailed information for projects.

I have a table called "Waterfall" that contains basic information and schedule information for each particular project.

I have a combo box "Contract" that selects information based on a query "Core" that gathers certain information I want to use of form "Admin"

I understand it's generally not a good idea to duplicate data in tables, but for specific reasons I am here. My combo button "Contract" has an event "On Click" that gathers information I want copied from table "Waterfall" via query "Core" is:

Private Sub Lookup1_Click()

Me![Project Description] = Lookup1.Column(1) =>goes to a text box
Me![TContract] = Lookup1.Column(3) => goes to a text box
Me![Requestor] = Lookup1.Column(5) => goes to a combo box
Me![AEM] = Lookup1.Column(4) => goes to a combo box
Me![AE] = Lookup1.Column(6) => goes to a combo box
Me![Priority] = Lookup1.Column(12) => goes to a combo box
End Sub

Now, the items listed above are sometimes just a text box and sometimes a combo box (because there are times, when items get entered that don't fit the original combo box.

Now, here's the rub. When I select the pull down on the combo box it lists all available projects. You find the one you want and select it. At that point, only Columns 1 (text box) and 6 (combo box) auto fill. The other information does not fill in .. BUT, if I more to the prior record and back, all information shows up OR if I click on any of the particular fields, the information shows up in that field. In theory, everything should show up right away.

I thought it might be because it doesn't like to autofill a combo box, but one of the combo boxes fills fine. And all of the information is acutally going to the various boxes, it just doesn't show up right away.

View 10 Replies View Related

Forms :: Filling Multiple Date Fields In The Form With First Value

Mar 3, 2015

I have a table where I use 3 date fields in, all with different views.

Field 1: Date as dd/mm/yyyy
Field 2: Quarter: q (shows the same date, but then as quarter of the year.
Field 3: Year: YYYY

Now I have a form that fills all of my fields, but is there a simple way () to populate the other two fields Quarter and Year from the value I entered in Date?
So if I change Field "Date", Fields "Quarter" and "Year" updates as well.

Maybe I don't need to do it in the form, but in the table?

I'm not that good with VB- scripts, and I'm not sure If it is possible to auto populate the table field Quarter and Year directly in the table itself.

View 7 Replies View Related

Forms :: Access 2010 / How To Retrieve The New ID During Filling The Form

Sep 23, 2013

Access 2010 frontend, SQL-Server 2008 R2 backend

During filling a form, I generate a code which should include the ID of this record.

But the ID is not available before update of the form.

If I save the record before all fields mandatory are filled, i get an error of course.

How can I manage this and get the ID "earlier"?

View 3 Replies View Related

Forms :: Filling Lists By Double-click And Combo Box

Apr 6, 2015

I'm stuck on a portion of a form that displays members attending and not attending a specific event. I've got some of it working but others not.

1. Removing items from a table and updating a listbox
2. Changing the Event selection from Next Record to a combo box.

The code that I have in the two list boxes are as follows:

Code:
Private Sub Form_Current()
Me!lstNotAttending.RowSource = "SELECT DISTINCT Members.MemberID, Members.txtLname, Members.txtFname FROM Members " & _
" LEFT JOIN MemberEvents ON Members.MemberID = MemberEvents.fk_MemberID" & _
" WHERE MemberEvents.fk_MemberID Is Null OR MemberEvents.fk_EventID <> " & Me!txtEventID & _
" ORDER BY Members.txtLName;"
Me!lstAttending.RowSource = "SELECT Members.MemberID, Members.txtLname, Members.txtFname FROM Members " & _
" LEFT JOIN MemberEvents ON Members.MemberID = MemberEvents.fk_MemberID" & _
" WHERE MemberEvents.fk_EventID = " & Me!txtEventID & _
" ORDER BY Members.txtLName;"
End Sub

The code I have working for adding a member:

Code:
Private Sub lstNotAttending_DblClick(Cancel As Integer)
CurrentDb.Execute "INSERT INTO MemberEvents(fk_MemberID, fk_EventID) " & _
"VALUES (" & lstNotAttending.Column(0) & ", " & Me!txtEventID & ");"

Me!lstNotAttending.Requery
Me!lstAttending.Requery
End Sub

I know the code for removing has to start with REMOVE FROM. I just don't know the syntax.The combo box has no code.I'm assuming the Requery options aren't working properly for the listboxes

View 3 Replies View Related

Forms :: Subform Not Filling Required Info Into Table

Mar 15, 2013

I have a database which has been in production for quite a few years, it even made the swap from .mdb and .accdb without losing any of the functionality. Well I just had to export from access to new access to start a new file for one of our projects and now one of the subforms is not adding information into the table. The way the subform functions is it feeds information to the table Lease Tracts, at the same time it has another table Xrf Property Tracts Leases (I didn't pick the name and it drives me nuts too!)

When a user starts to add information into the subform the table lease tracts generates an auto number "tracref" which it adds onto the line where the user is inputting the rest of their information. The relationship is set as all alike between xrf and lease tracts to input in both tables, well the xrf lease num1 is being filled in by the master/child setting but the lease num1 on the lease tract is the only field not autofilling.

View 3 Replies View Related

User Login And Have Their INITIALS Auto-Filled When Filling Out Forms

Apr 17, 2013

I have a database where multiple users log in and work in 1 of 2 different forms. The 1st form in for initial data entry where users enter data then senter there initials and save each record. the other form is for QC'ing data that has been entered and they will add additional data to the form, then enter their initials and save the record.

How can I make it so that I can have a user once they log in to the database, it will autofill their initials? I have used a dropdown box before but it is not useful for people who have the same first name initial or worst, the same first and second initial because they end up selecting the wrong initials.

I do not currently have it set up where I have a login screen, I just have only forms visible to users when they enter data. Any easiest way to go about making this happen (I am just trying to shorten the amount of data entry that gets done).

View 9 Replies View Related







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