Forms :: Retaining Drop Down Value For Next Record
Apr 27, 2015
After choosing a dropdown value and filing in other required fields, I click Add Record. Is there a way to retain the same value in the dropdown list assuming it will often be the SAME AS dropdown value (e.g., the same customer) of the record I just added?
View Replies
ADVERTISEMENT
Oct 13, 2015
How to code this button so it creates a new record while retaining information such as a serial number. So if you pull up the item check out its past service. then you want to click a "new entry" button but you want the serial number to remain in the field.
What I got so far is:
Private Sub BtnAdd_Click()
On Error GoTo Err_BtnAdd_Click
DoCmd.GoToRecord , , acNewRec
Exit_BtnAdd_Click:
Exit Sub
Err_BtnAdd_Click:
MsgBox Err.Description
Resume Exit_BtnAdd_Click
End Sub
But obviously it erases the serial number.
The field is txtSerialNumber and the control source is SerialNumber.
View 7 Replies
View Related
Mar 9, 2006
hi,
i have a form that uses combo boxes for entry, some of the combo box entries are dependent on preceding combo box selections.
i have managed to make the combo boxes present options based on the previous selections, but am finding that after i move on to another record, some of the combo box entries are not being retained or stored in the record.
It happens only on some records and sometimes when I return to it again the selections are there even though on a previous ocassion they were not.
Can anyone suggest what may be causing this?
Regards
K
View 5 Replies
View Related
Dec 13, 2007
I have a unbound text box being used as a label. In the control source of the text box I have a date ie. =#12/31/2008#. I am using this date for criteria in a dsum function, so whatever date is in this field effects the data being displayed. I need to be able to have the user edit this date when necessary. I created another unbound text box and put the following code in the after update: Me.ReestDate.ControlSource = "=#" & Me.EnterReestDate & "#"
This is working as it is displaying the correct change. My problem is that the control does not retain the date. When I exit out and go back in, the original date is still there. Is there some code that will save the field after I update it? Or maybe another suggestion to do what I need.
Thanks
Gregg
View 3 Replies
View Related
Jun 22, 2005
I have a query and i want to join 2 fields together
eg. JOB:[Type_id] & [Number_id]
this works fine but i need to put an input mask on the field
type id is 2 letters
number id is 4 numbers (0001)
however whan the filed JOB is created all leading 0's from Number id are lost
how can i prevent this
RICKA
View 2 Replies
View Related
Nov 10, 2006
Hi, how do I retain the order of my records in a table in terms of when added ie
1st record id = 3456
2nd record id = 1234
3 rd record id = 2456
but when i go into the tabel it is now in order of 1234, 2456, 3456...i dont want numerical ordering!!
Cheers
Tania
View 1 Replies
View Related
Jul 21, 2005
I have a form with a drop down list, when the user selects an option and press a button. I would like to add the value of the drop down list to a table as a new record.
Thx :mad:
View 2 Replies
View Related
Jul 6, 2006
I have two fields set up on a form, when the user double clicks in field 1, the text that was in Field 1 then moves to field 2. The issue is that the text in field 2 only retains the most recent text change - overwriting the text that was in field 2 previously. How do i make it so that every time the text moves to field 2, that it keeps a running history of the text?
View 1 Replies
View Related
Oct 19, 2004
Newbie here,
i have two tables with 3 fields in each (code, Description and amount)
what i need to do is join these two together to show data from both tables (some of the
data in fields one and two will be identical, but the third fields in both
tables will need separate entries for each table)
the primary key would be the first field (code) ysee, the original table has been updated
by a n other, some codes and descriptions changed for others so, i would like to end up with
feild one, all codes from both tables, field two,
all descriptions matched to codes from both tables,
field three numbers matching from first table, field
four numbers matching from second table.
is this a possibility?
please help...loosing hair!
Paul
View 14 Replies
View Related
Nov 11, 2005
Hi
I want to be able to invoke a form from a main form that allows me to add, delete or amend records in a table related to the one updated by the main form.
As many details records are being updated, I want to retain the value of a couple of foreign keys (but be able to amend them if required) based on the value of the previous record.
I have looked at the Dlookup function and wonder if this is what I should be using. If it is, I am having trouble trying to understand how you could differentiate between the first invocation of the pop up form and any subsequent table entries. The way I understand this function is that to get the value of the previous record in the table you use "ID-1", but this would almost certainly lead to an error for records being updated for a new master record, or if the table happended to be empty then there would be no ID-1 record.
Any help would be greatly appreciated.
Thanks
View 3 Replies
View Related
Oct 28, 2004
Hi,
I'm relatively new to Access and have just created a database and am wanting the database to calculate the total of two fields and store this information in the underlying table.
Example:-
Field 1 - £10
Field 2 - £15
Field 3 - TOTAL of above - I have used the calculation =([Field 1]+[Field 2])
This works fine in my form but the total value doesn't fall through to the table. It is just blank.
I am using Access 97 and wonder if this is somehow possible. I have attached a screen shot of the properties for this field (which is called 'Total' in the underlying table).
Any assistance would be appreciated.
Thanks,
Dean.
View 1 Replies
View Related
Nov 13, 2006
I am creating a database to track a student's course load in a degree program.
When the student enteres their ID on the first form I want to retain that value so subsequent forms and views display their records, or allow new entries/updates to different tables without re-entering their ID. I'm having no luck passing the value entered into the first form's text box to other processes selected prior to closing out the database.
Thank you.
View 3 Replies
View Related
Oct 9, 2014
I have a backup subroutine which automatically triggers when the front-end is closed down (it just takes the back-end, makes a copy and compacts it).It's driven off a hidden form which I use to track who is connected to the BE at any given time. This form is opened as part of the AutoExec when the FE is opened and writes some basic user info to a table. When the form is closed, it updates the table and fires the backup process before quitting Access.
Part of that user tracking process checks to see if the same user is already connected - either elsewhere (i.e. on a different machine) or on the same machine (i.e. opening a second instance of the same FE) - which is undesirable (and, frankly, unlikely, but not impossible) A brief prompt appears to explain that they can only be connected once, at which point the application is quit (to enforce the rule) This also works fine.
I would add a public boolean variable, set it to True by default, then switch it to False if the same user is already logged on before quitting Access.Trouble is, the variable doesn't seem to be holding its value? Here is the Load event for the tracking form :
Code:
Private Sub Form_Load()
On Error GoTo ErrorHandler
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
Call InterfaceInitialise
blnPerformBackup = True
[code]...
For some reason, blnPerformBackup is False every time, even though I set it to True at the very start of the Load event (and it is a Public variable, defined in a separate module where I store all my Public constants and variables)
why it is not retaining its value from the Load event? I've checked and it does get set to True - and when I debug, it remains True - but at runtime it reverts back to False by the time it reaches the decision whether to backup or not?
View 9 Replies
View Related
May 11, 2015
Is there a way to import data to Excel from Access without retaining the link ?
I have a table and two queries (from that table) that I wish to export to a specific (Templated) Excel file.
I want to send the data to the Excel file then be able to subsequently copy and paste and email the file without any data connections etc.
Alternatively : to export from Access to the templated excel file.
View 2 Replies
View Related
Jul 7, 2013
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.
View 1 Replies
View Related
Jul 24, 2012
Is there anyway that access could create a drop down box within a drop down box? For instance, when a selection is made in a drop down box, it opens another drop down box with choices.And is it possible to link an inserted image from a form to open in MSPaint that when it opens, the image is already there?
View 1 Replies
View Related
Jul 4, 2005
Hi I'm a beginner using access and I was wondering if it's possible to choose a value from a combo box in a form (like a customer #) and when chosen the rest of the fields would get the corresponding values from table CUSTOMER. I have made the customer info a sub-form in my main form called ORDER your help will be greatly appreciated
View 2 Replies
View Related
Aug 28, 2012
I have a DB containing over 4 million rows of data, each with a SALES_PERIOD based on YYMM. Our Developers set it up as Text, and index this item accordingly, I would like to format as numeric with the lead zero to allow quicker indexing, but when I format it it returns to text this is the formula I use?
Format((Val([SALES_PERIOD])), "0000")
View 5 Replies
View Related
Aug 13, 2013
Is there a way in which i can link three drop down boxes together?
I'll create an example of what I mean...
I'll attach a Excel file which contains two identical filters, one of them where the filter is turned on.
If I select the "Serviced" filter, I am left with three options for "Make" and two options for "color".
If I select the "color" as "White" I am left with just one "Make" - "MG".
I understand that some sort of "hierarchy" needs to be in place so I will Make it so that "Serviced" Must be entered first, then "Color" then "Make" so that if you select a different "Service", the "Color" and "Make" will repopulate with the appropriate values.
This is certainly possible with a REDICULOUS amount of coding that would map each value to its corresponding values however is this possible some other (easier) way?
View 10 Replies
View Related
Mar 25, 2015
I can create a dropdown list to filter my form (text) however im struggling to get back to showing all the data prior to my drop down selection.
ive tried refreshing and requerying with no success.
I would either like to get a drop down with the addition of "all records" in it or a refresh button.
the form that this is on is a sub form.
I could reference the drop down to a number if required.
Additionally: When I have selected my choice from the drop down box it blacks out "selects all". Is there away of making the list just select and lose focus so to speak.
View 1 Replies
View Related
Apr 30, 2014
I work for a doctor, and I am creating a database to assist with surgery scheduling. There are a lot of pieces and parts to this process, and I am building a "bird's eye view" of tasks to be completed, such as "Notified OR," "Sent Surgery Packet," and "Scheduled Post-Op Appt." Each one of these fields has a lookup attached to it with three choices: "Yes," "No," and "Not Needed."
What I want is for the drop-down box with the three choices to be (a) automatically defaulted to "No," (b) immediately turn red if "No" is displayed or immediately turn green if "Yes" or "Not Needed" is displayed. In this way, the goal for our scheduler will be to get all the drop-downs to turn green (an easy visual cue that the patient is ready for surgery) by the date of the procedure.
View 1 Replies
View Related
Aug 29, 2014
I have made my first form and I did not to bad (?). I am thinking there is a faster way to enter data into my drop down box. I have set the tabs in the order I like but I have to tab to the next dropbox, then double click to open the box, then double click on my choice then double click on the next one. Is there a quicker way to go through 25 dropboxs?
View 6 Replies
View Related
Aug 30, 2013
The subform, which is in datasheet view, contains two dropdown boxes, Country and District (1-n). I want the district dropdown to only display records based on what's selected in the country dropdown. There will only ever be any content in District if one country is selected (let's say country 'A').
I've used the code below (one of many attempts!) to try to achieve this, but it doesn't seem to have the effect I want. It seems that if I select country 'A' from the country dropdown, the District rowsource is as expected for that particular record. However, the rowsource for every other District in the list of records in the subform also now has the same rowsource even where the country <> A.Similarly, if I select <>A from Country, the rowsource fro every district is now empty, even if the country selected in another row is A.
Dim strSQL As String
strSQL = "SELECT DistrictID, District, DistrictOrder "
strSQL = strSQL & "FROM tblDistrict "
strSQL = strSQL & "WHERE CountryID = " & Me.cmbCountryID & " "
strSQL = strSQL & "ORDER BY DistrictOrder"
Me.cmbDisctrictID.RowSource = strSQL
View 4 Replies
View Related
Jan 15, 2014
I have a database with a drop down box that lists all of the contacts in the database. When I select someone in that drop down box it goes directly to their record.
What I want to do is be able to display different criteria in the drop down box based on some criteria. So one criterion might be everyone, another criterion might be only people with a certain product.
How would I do this?
I guess I would like something like, one drop down box selects the criteria (show all clients, or show all clients with a certain product), then another drop down box is based on that one which displays that which was select in the first drop down. Then the results in the form would display based on the second drop down.
View 5 Replies
View Related
Jun 27, 2013
As an example lets say I have a table listing some cars:
Car Make Car Model
Ford Fiesta
Ford Focus
Ford GT
Mercades C Class
Mercades E Class
Mercades A Class
I am making a form with two combo drop downs with the ability to select car make or model.
Car Model is Unique so if the car model is entered, I will force the car Make into the other combo box
however, If i select "Mercades" for example in the car make, I would like the combo box of Car model to only be filled with the possible models that Mercades make.
Is this possible? (to search for the values available in Car Model based on the value entered in Car Make?)
View 1 Replies
View Related
Aug 6, 2015
1. I have a drop down menu with numbers 1 thru 15
How do I have the drop down menu go 1,2,3,4, etc.
Right now it goes 1,10,11,12,13,14,15,2
Also I have two fields where the user enters money
2. How do I set up the form so when the user types in 430 it is 430,000.00 and not 430.00
View 1 Replies
View Related