General :: Setting Default Value For New Entries As Previous Entry
Jan 17, 2013
Is there a method of setting the default value for new entries to the same value as the previous entry?
For example, I have a quality control information table that stores QC data for different lot numbers. It is annoying to enter in the lot number and product code field over and over again if there are dozens of records per lot number. Is there a way for Access to easily display the previous entry as the default value?
I have a user who would like the value from the last entry into the form's title field text box to show as the default value when he clicks on enter new issue button to bring up a new record. I do not know if this is possible but I thought I would check for him.
G'day. I've been browsing the forum trying to find a solution to a problem, without much luck, and am hoping that someone might be kind enough to help me more directly.
I'm a biologist and a newbie to access: with the distinction of being completely clueless about VBA. Nonetheless, I have been tasked with creating a database for storing data obtained from biological surveys of juvenile salmon and harvest/spawner surveys of adult salmon.
The bones of the db are in place and functional. The problem I have is streamlining the data entry process to minimise keystrokes/mouse clicks.
I have a subform for entering fish records with attributes such as 'species_name', 'fork_length', 'count', 'presence of tags, etc. The idea is that fish can be entered as individuals (count=1) or groups (count>1) with attribute data at the appropriate level (eg, fork lengths only entered for individuals. We typically measure the fork lengths of the first 20 individuals of each species and then tally the remainder).
One problem I face is that fish often occur in schools, and it becomes quite tiresome to click and select the same species_name combo box value for each record when entering multiple individuals of fish of the same species.
What I would like to do is set the default value for that combo box (on the fish subform) to match the value entered for the previous record.
I suspect that you could use the after update trigger to execute some code to change the default value each time something is entered manually into the combo box. Unfortunately, I know nothing about how to write the appropriate code.
I'm having trouble with a Form and getting a text box entry box (Date entry) default to the date entered on the last record, which is linked to a table.
The only way I can get it to work is to type the date into the Text Box's Default property, for example, #11/13/13".
How to get the correct syntax or code into the Default property of the Text Box to make this work? I only want the entry to change versus the previous record/entry if the User changes / enters a new date.
I have a folder under the default on in outlook named ANOTHER FOLDER. All I am trying to do is add the blasted entry to this folder. At the moment though it is adding the information to the default calendar and not ANOTHER FOLDER. I'm just testing at the moment but I have tried all manner of combination but no dice.
Code:
'Error 429 occurs with GetObject if Outlook is not running. On Error Resume Next Set objOutlook = GetObject(, "Outlook.Application") If Err.Number = 429 Then 'Outlook is NOT running.
I'm working on a pre-existing form. When I open the form, I am able to enter new data and this data gets stored in the database fine. If I close that form and reopen it, I cannot view past entries or edit them. I know of a property (Allow Additions, Allow Edits, Allow Delete) which can change this behaviour, but these seem to do nothing for this form. I have them all set on yes and it behaves as I've described. Ideally, I would like to allow edits of previous data.
I thought maybe the SQL query controlling the data wasn't returning any entries, therefore no entries would be displayed. So I saved the query and opened it up to see how many entries it did find. And it found all that it should have, so I know that the SQL statement controlling the form is what I want it to be.
So my question is this: are there anymore properties or values that I don't know about, that would control the mentioned behaviour of the form? Maybe something somewhere that I'm missing, that would make the form add only?
Let's say in one table (called Employees) I have two columns, Name (the Primary Key) and Job (Both are text fields). One row contains "Jack" and "Gardener" in each column respectively. If I were to have a form for a different table where I select Jack's name from a drop down menu of all the "Names" in "Employees" and it then automatically fill in the next field with his Job (which would be "Gardener").
I really hope I'm making sense... Is this possible?
I'm trying to design a simple wildlife tracking DB, so that when myself or my colleagues spot an animal we can enter its ear tag number via a form. That will either bring us up a list of previous dates/locations that animal was observed, or if it's not in the DB, allow us to enter the new animal and location.
I have two main data tables: dt_Animal- which stores the ear tag info, species, and other information about that unique animal dt_Sightings - stores info on when/where animals been seen (linked to dt_Animal in a one-to-many relationship, of course)
What I want is that when you open up the form, you get a box (text or combo) to enter the animal's ear tag number.
- If it already exists in the DB, it brings up all the info on that animal and its previous sightings - with the option to fill out any missing info and (of course) to add a new sighting - and it WILL NOT add a new record to dt_Animal - just to dt_Sightings - If it DOESN'T exist in the DB, it creates a new record in dt_Animal and allows you to enter any/all of the other information
Where I'm running into problems is that I don't want duplicate records in dt_Animal - each animal is unique. I haven't found a way to set up a form so that you don't get pop-up errors if you're typing in an ear tag number that's already in the system.
I've tried various tactics involving simple coding (NotInList, etc.) that I pulled out of this forum and other places, but haven't had any luck.
I'm fairly new to databases and have been attempting to build a multi-table database. It's not properly rationalised, but I wanted to test run it to ensure it was fit for purpose first.I've built my form, which is pushing data out to several tables, but I cannot seem to get the form to pick up previous records.
Say I have table called "project" that hold info like project name, project date, # of project, etc.
And I have a table "employee" that hold info like name, salary, # of employee, etc.
Project and employee are linked together ( many to many ) on a junction table. Basically "# of project" and "# of employee" are connected in a junction table.
As such it is easy to add or remove people off a project.
However many people are present in nearly all projects. As such I'd like to make it so that each time a new project is created, it assign those people to the project by default.
Hi Im wanting to set a default text from a previous record. I have a fields that has Start location and Finish location, Im wanting to set a defaulf so that the Finish location from the previous record is defaulted to the Start location of the next. Is this possible???? Please help.
I seem to be have trouble resolving an issue whereby data entered via a combo box based on another combo box from separate tables/queries is not able to be retained when the data in the original table has been "discontinued". The database in question has changing items that are continually updated and/or discontinued. However when these items have been checked as "discontinued", the old entry data is then updated and the fields are empty.
Hi, I'm trying to set a default value to field in a form. The field relates to Table 1 and I need a value from Table 2 as Default! I've tried entering an SQL query: Select Max(ID) From.... ; But it doesn't work! Maybe It's just a question of syntax?? Thanx for your help.
I am trying to set a default value in a date field. I would like for the default value for this field to be the date thirteen days from the last date entered. How would I go about doing that... Any help would be greatly apprecated.
I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.
In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.
In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.
When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.
Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.
The next stage I'd like to include is a match and enter pricing details. We get a lot of repeat work that is entered onto our system, due to the nature of the work we do each item is then checked individually. There is a portion of this that could be automated.Our order intake table has an amount of information, various bits of which are supplied by various customers, but not always all of the information is required or given.
Id like a price to be copied from a previous record where the "shots" field matches a previous entry.The other fields that would need to be similar are the "coverage" "drawing no" "pattern no"..But only when these fields are populated, we often, but not always put a - in these fields where the information is not given. I think this may be bad practice, but it shows us the information has not been supplied, and not just missed from the order.
To sum up, when an order is completed i'd like to have an afterupdate event that searches the previous records, where cover, drawing no / pattern no are *matching* and the shots do match, then copy the price of a matching record, where that record is within 12 months of today (using the date_rec field) and then tick an "automated_price" field so i know the price has been generated by the system.
I am not sure if I am even able to do this, but I am wondering how to set the default value for a field when creating a database using SQL. I am doing everything with coldfusion and I havn't been able to figure out what code needs to be there. I have tried everything I can think of. Any help would be appreciated.
On a form i have a text box which holds the date that a file batch was taken to be processed. Each file holds the date of when the batch it originated from was taken. At the moment for ease of use the 'Default Value' of the text box is set to the batch's date.
I want to set it up so i can change the default value of the cell, so that when a new batch is to be processed the new date becomes the default value.
I am invisaging a button which brings up another form with a text box into which the new date can be put. when the form is saved and closed, the date recieved cell on the master form assumes the new default value.
I have a report with a number of text, date and combo boxes. We quite often add items that are very similar, so it would be useful if the values you've just entered were kept the same for the next item. Then you can just change the odd field that's different. Is there a way to achieve this?
I have a form with a number of text, date and combo boxes. We quite often add items that are very similar, so it would be useful if the values you've just entered were kept the same for the next item. Then you can just change the odd field that's different. Is there a way to achieve this?
i've got a Form that contains Subform with an embedded Query that contains 2 tables only (Payments & Invoices) the Join properties between them show all records from payments and what matches it from Invoices where the joined fields are equal (Invoice no).. So, when i enter certain data in the main form the Subform show the results for it from Payments table and only one field needed from the Invoices table !!
The problem is.. i can't edit or add any data in the Subform results with the previous setting, but when i completely remove the Invoices table from the embedded Query then swift to the Form and it's Subform.. i become able to edit and add data in the Subform easily... !!
So, how to enable the edit/add in the Subform with the 2 tables in the embedded Query ?! Cause it's really needed to show that field from the Invoices table.
I have a membership database. A number of members go by their middle names or a nickname rather than their first name. I need to keep track of their real full names, but I want the new-record default of the preferred name field to equal the contents of the first name field. How do I set this in the table design? The table already has 1400 records, and it would be quite a job to manually copy each first name to the preferred name field, a job I would rather avoid.