Unbound Combo Box Selection To Load Record
Apr 5, 2005
First, just want to say I wish I had found this site a long time ago. Lots of good stuff here :) I don't know a lot about Access, but know it can be a great tool for what I need. So I hope I can find the help I am looking for...
Ok, on my form I have three unbound combobox's that I use to filter the information I want. The first two do not need to be used, meaning that the third combobox will show all the records if the first two are left blank.
With that being said...
I would like the form to show no data until the selection is made in this third combobox. SO, my first question is how do I make the form show no records till this combobox has a selection. And second (at the same time), make that third unbound combobox with the selection load that record to the form fields so they can be viewed or edited??
I'm sure it can be done, but I am lost...
Hope I explained it ok :)
Thanks in advance!!!!!!
View Replies
ADVERTISEMENT
Jul 12, 2013
There are 2 issues I am trying to figure out for an Access2007 form:
1) I should first state that I am working off of 3 tables:
a) Marketers
b) Companies that belong to those marketers
c) Points of Contacts (POC) for each Company
2) In my frmMain, I have 2 combo boxes. The first loads the second and the second loads a CompanyID text field (IDc) that the subform bases for which record info to pull. How do I get the CompanyID (and subform) fields to load blank upon form open and until the 2nd combo box selection is made?
3) A company that doesn't have any POCs entered yet won't load its CompanyID even though it DOES have an ID number. Well the Id not being changed doesn't change the POC info either. I am guessing it's because there is no info to fill in the subform yet. However, I need to be able to still pull up the blank fields so I can ADD a POC.
View 3 Replies
View Related
Feb 14, 2014
I have a form that I populate after making selections in two combo boxes but when I load the form the text boxes are already filled in with the first record. The combo boxes load blank, which is what I want.
How do I get the rest of the form to be blank on load? It is made up of text boxes and check boxes that are all bound. Will this only work if they are unbound?
View 7 Replies
View Related
Oct 10, 2007
Hey,
I have 2 combo boxes. The first one gives a lis of Prefix letters for railcars. The second uses the value of the 1st and finds railcars that start with the same letters.
finally got the 2nd combo box to list the prefix and number of a railcar based on the 1st combo box and also got it to clear as each run-through starts.
Now that the user can select a number (ex. dfcv1234 as the railcar), I need to find the record with the prefix dfcv and the car number 1234 and load the record to the form for view and editing.
So far, I know it needs to be the after update event and have a select statement that finds the [key], [prefix], [car_number] that matches the value selected on the form but how do I use the key to make the record show on the form?
Thanks,
slh
View 5 Replies
View Related
Apr 21, 2014
My table:
tblHeatTreatment
- HeatTreatmentID - PK
- HeatTreatmentDesc - Text
- HeatTreatmentDetails - Memo
My form has a listbox (lstHeatTreatments - Multi-Select disabled) that displays Heat Treatment descriptions and an unbound textbox (txtHTDetails) that I would like to have display the corresponding memo field when a description is selected from the listbox.
This is my code so far:
Code:
Private Sub lstHeatTreatments_AfterUpdate()
Dim myConnection As ADODB.Connection
Dim myRecordSet As New ADODB.Recordset
Dim mySQL As String
Dim selectedRequirementKey As Long
Set myConnection = CurrentProject.AccessConnection
Set myRecordSet.ActiveConnection = myConnection
[Code]....
When I run the code I get an error:
Quote:
Run-time error '-2147352567 (80020009)':
The Value you entered isn't valid for this field
When I debug, it highlights:
Code:
Me.txtHTDetails = myRecordSet.Fields
View 3 Replies
View Related
Aug 1, 2005
I have a Main Form
Main Form [Event],[Category],[Judge Name]
The Main Form also has a subforms
Sub1[Event],[Category],[Judge Name],[Score],[Comments]
On the main form I have a combo box that is set to retrieve records that meet the combo selection. and thus the subform is related to display the corresponding records.
In my selection combo box I see all of the various selections as follows
[Judge Name],[Category],[Event]
and it is bound to the judges name
Problem Example:
Pull Down Values
1.[Sherry],[Fitness],[Mrs. Canada]
2.[Sherry],[Swim Suit],[Mrs. Canada]
In the above when i pull down the combo box to select and I select the first example above all is wonderful ; however if i want to select the second row the [Category] and [Event] Do not change and the information i input into the subform ends up being associated to the wrong category.
How do i bind a combo box to more than one [field] on the form
I have over 50 hours into this DB to this point and this is critical.
View 1 Replies
View Related
Sep 5, 2005
Good morning all! I've got three bound combos set to visible = false on their property sheetsThese will remain hidden or will be revealed depending on the selection made in another bound combo cmbType.
The select case below works fine on the form but the selection affects all records not just the current record. Open record 1 and select "compliment" from the first combo - the three others correctly stay hidden. Move to record 2 and select complaint and the combos appear - Great! Move back to record 1 and they're showing there as well. Groan. Helllllppp!
Private Sub cmbType_AfterUpdate()
On Error Resume Next
Select Case cmbType.Value
Case "Complaint"
cmb2Day.Visible = True
cmb15Day.Visible = True
cmbOver15.Visible = True
Case "Compliment"
cmb2Day.Visible = False
cmb15Day.Visible = False
cmbOver15.Visible = False
Case "Suggestion"
cmb2Day.Visible = False
cmb15Day.Visible = False
cmbOver15.Visible = False
End Select
End Sub
View 1 Replies
View Related
Dec 13, 2006
Hi,
I am trying to update prices changes for products in my inventory database, and am stumped.
I select a vendor, which then populates the product name from which I can then select the product I want to update. From here, it populates what the current prices are. I then can type the new price into the next box, but what happens is that it doesn't change that Product it changes the 1st record.
Can anyone help!
View 3 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
May 6, 2015
I'm experimenting with unbound object frames to embed an excel sheet in Access.If I have an excel application already open and busy, and then open my form, access freeze completely and won't do anything. My users will probably be running excel vba programs when they attempt to view this form, if there is no work around I'll have to drop the idea of embedding excel in access.
whenever an "external" thing wants to use excel (opening a file in explorer, etc), it uses the very 1st excel application open on the computer at this moment, instead of creating its own instance, or at least scanning for how busy the open application is. Because of that, I think that even loading the preview in the access form will try to use the current excel process even though it's completely busy.
View 2 Replies
View Related
Jan 14, 2014
I have a combo box called Combo9 in form NavigationF, the combo box displays the results of FollowUpQ Query. What I would like to do is when the user selects a row from the combobox is closes NavigationF and opens ContactHistoryF and goes to the record selected in the combo box. I have made sure that the combobox contains CustomerID which is the primary key for my table.
View 4 Replies
View Related
Oct 25, 2005
I have set up a query to give me details of employees names, the business they work for and where they work.
If I run it without criteria I get all of my records, as you would expect.
However, I want to be able to select parameters from combo boxes and then run a specific report of employees by location. I did have this working by accident a while ago but have changed quite a lot since then.
I have set up an unbound form with three combo boxes - Business, Business Unit and Location. Then a button for preview and print report linking to my report template.
I have refernced the controls in the relevant columns of my query as: [Forms]![FormName]![Control].
When I run the query I get nothing back and I don't understand why.
View 9 Replies
View Related
Feb 28, 2006
This should be an easy one, just not for me.
I have a combo box on my form, when the form loads the combo box is blank, but the records attached to the first item in the combo box are loaded in the subform on the form so it appears that I have records attached to nothing (which isn't the case). Basically, I want the first item in the combo box to be visible on load so that the records in the subform don't look orphaned.
Any help would be appreciated.
Thanks.
View 1 Replies
View Related
Oct 20, 2005
Hi everyone,
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry
Africa Zambia
Africa Congo
Africa South africa
Europe England
Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
Thanks
Humphrey
View 1 Replies
View Related
Jul 11, 2012
I'm have quite a difficult time getting a form in Access 2010 to perform the way I would like it to. I have multiple tables that I've created, and a query that contains the data from the various tables. I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.
What I want to do:
1. I want users to be able to select a category in combo box #1 (example: "Bag")
2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the following selections for combo box #2: "sandwich" and "tool")
3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"
I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.
View 1 Replies
View Related
Jun 14, 2014
I only have one table that both forms pull from.
I have 3 forms. The only form a user will ever see is F_Main
F_MAIN (Just loads the 2 forms below within itself)
F_Data_Short (Grid View.. Rows and Columns.. All Records.. Shows some fields)
F_Data_Long (Single Record View.. Showing all fields)
F_MAIN
-> On the left is F_DATA_SHORT
-> On the Right is F_DATA_LONG
How can I set it.. When a record on the left included form is clicked.. it loads that same record on the right included form. No pop ups...
I know I can use the On Click option for the form on the Left... and set code or a macro to the load the data on the right. I tried everything and can't seem to get the data to load on the right when a record is clicked on the left...
View 2 Replies
View Related
Jun 13, 2013
I'm using a barcode scanner to enter ID numbers into a combo box on a form.. I've got it to do this much - scan the barcode, and then the form loads the relevant record. Great - now I want, that when a barcode is scanned, it makes the next field the 'live' field (the one with the cursor in it).
View 4 Replies
View Related
Oct 26, 2004
I'm trying to get one combo box control what tables are available from another combo box. Example, combo box (a) includes numbers 1-5. Selecting (1) makes the data in combo box (b) specific to that selection. Selecting (2) makes the data in combo box (b) something different (pulls data from a different table).
Can anyone help me with this? Thanks!
View 1 Replies
View Related
Nov 29, 2014
I'm trying to build a database for daily work. My work in daily basis I have to fill all condition for several items.
We have two areas, with two locations under each area, and three systems under each location and each system contain more than 500 items.
I created all tables and fill by all information:
1-Table 1: Area 1, Area 2, Area 3, Area 4, Area 5, Area 6.
2-Table 2: Location 1, Location 2.
3-Table 3: System 1, System 2, System 3.
4-Table 4: all items under System 1-1-1
5-Table 4: all items under System 1-1-2
[Code] ....
Last table will be LogBook which will be as follow:
date l time l area l location l system l item l Conition1 l Conition2 l Conition3
My question regarding to the form of the above table:
How can I make a combo box for area field and when I select for example area1 will appear only the locations which under area1 in location field, and when I select location1 for example will appear only the systems under location1 in system field, and when I select system1 one for example will appear only items under system 1.Combo box list will be based on the selection in previous combo box and so on.
View 3 Replies
View Related
Feb 6, 2013
I have a form, with a subform and another subform
Once a supplier name is selected from the combo box i only want it displayed that suppliers products in the subform, subform. (products combo box) I can get a basic query to show these results but can get the combo box to do the same.
The design screen is also attached below ....
View 14 Replies
View Related
Apr 1, 2015
I am having an issue trying to show all records when I load my form. It loads correctly when I don't have a record source for the main form. However, the combobox filters will not work. My goal is to have users be able to use the datasheet, subdatasheet and combobox filters. I can get the form to work just fine when I link the Main form and subform, but when the form opens it is filtered on the first record. I have been successful with this approach when using other forms, but they didn't require a subdatasheet.
Is there anyway I can have the comboboxes to filter yet be able to show all records until the user selects filters? Is this possible?I finally got my Manager to agree to use a database instead of Excel files based on this form setup and I need to make as "user friendly" as possible (look and function like a spreadsheet) I attached some pics of the form along with the code for the filter.
View 1 Replies
View Related
Aug 15, 2005
Hello,
I am trying to have a command button load a form which will filter the records to those pertaining to a value selected in a combo box on a previous form and have the value for the combobox selection display in a textbox on the subform. However, I also want the subform to only display a new record, while still displaying the value selected from the combobox.
Basically, I want to select value on combobox, click button to open form and see a new record with the selected value displayed in a textbox.
So far I have used the wizard to create code for linked fields, and then pasted code for adding a new record, but the two don't seem to go together. Does order matter? Is there a better way of trying to make this work?
I have posted this a number of places and so far haven't been given any useful information. Can anyone help?
View 1 Replies
View Related
Apr 16, 2008
I have a multi user database that has record locking turned on at the form level. If one user is in that form making changes it locks that record so no other user can make changes. When another user tries to edit the same record they are only notified after they hit save. Can you have them be warned that this record is locked before they waste time entering data?
View 1 Replies
View Related
Jun 12, 2013
The problem I am facing is applying an IF statement to every record in the detail section of the subform.
I have the following code:
Code:
If Me.status = "CONFIRMED" Then
Me.course_ref.Enabled = False
Me.course_date.Enabled = False
Me.cmbModule1.Enabled = False
Me.cmbModule2.Enabled = False
Me.course_start_time.Enabled = False
Me.course_end_time.Enabled = False
Me.course_training_cost.Enabled = False
End If
This is in the on load event of the subform and works 'sort of'
Basically I have a record with the status of confirmed and records without this status, but the result of the if statement is being applied to all records. Is this because I need some sort of loop? and if so how would I loop through all records in the detail and apply this if statement to them all?
View 5 Replies
View Related
Aug 29, 2006
Hello all
I'm new to Access so sorry if this is stupid - I have looked everywhere!
I have an unbound combo box on a form that is populated in the onload event of the form by setting the rowsource to a query based on the companyID on the form. The query gets me a list of contacts at that company.
So, after the form is loaded the combo box (if dropped down) might show:
1 Fred Smith
7 Jim Jones
9 Arthur Askey
The first column contains the ContactID.
My question is .... when the form loads I know the ContactID of the person I am looking at. If that person is 'Jim Jones' and I have a field on the form which contains Jim Jones ContactID of 7 - how can I get the combo box to be showing the 'Jim Jones' row?
(I don't what to bind the combo box to anything as I want to use it just to filter which contact I am looking at - not change the ContactID)
I guess I want to loop through the combo box saying 'If the contactID of this row = the ContactID on the form - select this row' - but I can't find the syntax anywhere.
Thanks for any help.
View 4 Replies
View Related
Mar 30, 2006
i really need some help with this... heres the background. I have an unbound search combo box in the header of my form. when users select the PCNo from this combo box, i need the associated container no to appear in a control on a bound form.. below are my tables:
tblShipping
ShipID (PK)
PCNo
tblContainer
ContainerID(PK)
ShipID (FK)
ContainerNo - (data to be displayed on form)
how can i pull up and display the container no (stored in tblContainer) based on the PC No that a user selects from this combo box?
i have got the combobox working fine - the users can select a PC No that is already stored. what i need now is for the Container No to be displayed on this form, based on the PC No.
View 1 Replies
View Related