Forms :: Using Combo Box Selection To Open Form And Goto Record
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.
I have a form that contains a form (Contain business data) and a then a sub form that hold the companies history of donations. BUT I also have another forms that hold miscellaneous data that I would like to look at also in the sub form area.
I want to select the sub form by a combo box to show the "sub forms"I want to look at by selecting a menu from a combo box.
I have worked with Access for years but some reason the combo box has always been difficult for me to completely understand.
I am struggling to pull out a report based on the combo box selection. I have NOI database and want to pull out a report for a specific customer that how many NOIs are generated by this customer..
I have a separate table of customer and another table of NCRs and the customer information comes from customer table.
I have tried the below statement but gives me an error message:
code for Macro that pulls the report in click event:
[CustomerName]=[forms]![CustName]![combocust1]
do i need to mention the report as well in some where in report ?
Hi don't know if I'm trying to do something that can't be done but I'll give it a try
I have a combo box which selects a type of incident e.g. report, SIF, Phone call etc
and dependent on what is selected I would like to get access to automatically select which form to open so if report is open when the command button is clicked then the report form would be opened, when SIF is selected the SIF form would be opened etc...
How do I go about this.. I have only ever wrote code in excel, so can I have step by step if it involves code (which I guess it does) including where to put the code and even how to go about it
One: I've done this before but I lost the code (and I've been away from DB for a while so I'm very rusty)
I have a form with many records, and in the header of the form, I have a combo box based on the PrimaryKey of the form. I want to select the record from the Combo box and have the form jump to that record.
Two, while actively entering new records into the form, I need the combo box to update to include all entries.
Need help on a list box issue. Solution is probably real simple, just can't see it with my bleary eyes.
I have a form (INSTLKP) with only a list box (List6) based on a table ((tblPersData) with fields PersdataID; SSN; Last; First; MI) on it. When I open the form up, the listbox does display all records associated withthe table. I would like to doubleclick on a desired SSN in the list box and have that record open up in a form (Perssub1) in edit mode.
And that is where the rub is... I have the following code in the On doubleclick event of List6
I have created Command buttons on forms with VBA code. Records GoTo previous and GoTo Next Record so both of working is good. But Next Record command is force to a new record. If suppose when we clicking on last record. It is go to new record without any message. So No need to force a new record with Next Record Command. Only just move to next record if there is no records show a message. Below mentioned both VBA codes so there is any changes on GoTo Next Record Code?
VBA Code: Go To Previous Record : DoCmd.GoToRecord , , acPrevious Go To Next Record : DoCmd.GoToRecord , , acNext
I'm looking for a simple routine, preferably in the On Key Down or or On Key Press event of a form to quickly navigate to a record based on the key pressed.
I have a form with names in a table layout (continuous form).If the user is on the name field, I'd like it to navigate to the first record that contains first letter of the key pressed. So if a user presses "K", the form will go to the first record that starts with a K.Yes, the names in the form are alphabetical, but in a list with over 100 names, this could speed things up just a bit and save a lot of scrolling and looking.I was thinking of using KeyCode and I already have an event to navigate by the arrow keys so I'm considering building on that.
Code: If KeyCode = 40 Then ' Down arrow DoCmd.GoToRecord acForm, Me.Name, acNext ElseIf KeyCode = 38 Then ' Up arrow DoCmd.GoToRecord acForm, Me.Name, acPrevious End If
I am thinking to use a Select Case and add the key codes for all the letters.
I have a form and subform. The subform is connected to the form and display all BandID's associated with that record. What i want is the ability to click on a record in the subform so that it automatically set's that record in the form for editing.
After appending data in a table, I open a particular form. I want to display only the last record. I've added the code (DoCmd.GoToRecord , , acLast) to the On Load and On Open properties without success (opens first record).
I would like to have the form to be set to its current record when being requeried. How can I easily achieve this? I've seen things about recordsets, I'm working with ADP (based on SQL Server) and don't know or all DAO events will help me.
I have a continious form where each record can be edited. After editing a record the form does a me.save and a me.requery (is important). After this it jumps back to the first record (seems logical), but how can I write a code that he goes back to the 'previous edited record'.
I have created a combo box with the values I need from a table. Once I select the correct record from the drop down box I'd like to be able to open the table with just that one record being displayed. Thanks for your help.
I have created a combo box that allows the user to select a particular customer from the drop down list. I have managed to type in some code that opens the customer form after the user selects a customer, but how do i get it to open the customer form on that particular record selected by the user????
- Form 2 to be locked but its "MaterialRequest" is enabled. - HandledBy to be unlocked if the MaterialRequest meets the "Status" of "frmMaterialRequest" which is "Approved".
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?
In the Contacts Table there are two fields, the unique Contact ID key field numeric and the Contact Name. Like this:
Contact_ID; Name 1; Tom 2; Dick 3; Harry
In a form named "Selection" there is a Combo box that references the Contact table, and lists just the three names in the drop down (showing the Contact_ID is optional - I'm fine either way):
Tom Dick Harry
When the selection is made it will populate the field Contact_Ref the table called SelectedName.
Question: When the user selects the name I'd like the data populated in the SelectedName table to be the Contact_ID Value, and not the Name, so if Harry is selected the Value "3" would be saved.
Hope this is a nice and simple one. I know I have seen various "last record" references in various threads but I couldn't find one in a search.
I have a command button on my form which navigates you to the next record. I use this rather than the navigation buttons as I can set the tab order to go to it after all the fields are filled. This works fine unless the form is on the last record, in which case it throws up an error. To get round this, I want to test that the current record is not the last record.
It is the test in the If statement I need help with. How do I check that the current record is not the last record in my form? I think it will use the dcount but I don't know how.
Private Sub cmd_Next_Record_Click() On Error GoTo Err_cmd_Next_Record_Click
If (current record < dcount) then DoCmd.GoToRecord , , acNext Else DoCmd.GoToRecord , , acFirst End If
Exit_cmd_Next_Record_Click: Exit Sub
Err_cmd_Next_Record_Click: MsgBox Err.Description Resume Exit_cmd_Next_Record_Click End Sub
I have been looking some information on changing image based on form combo box selection on form.
I manage to do case by case but i need it in a simple code because their will be many employees just to avoid adding case by case code for each one.
Private Sub Emp_IDCombo_AfterUpdate() Select Case Emp_IDCombo.Value Case "AM-001" Imageholder.Picture = "C:UsersAMGDesktopam-001.jpg" Case "AM-002" Imageholder.Picture = "C:UsersAMGOne DocumentsHR & Admin DatabaseEmployee Picturesam-002.jpg" End Select
I have employees table where all images location is saved in text field and i have a combo box on form which is employee id.
Tables relationship Employees_table [PK] to Contracts_table [FK] via field name {emp_ID}
Fields Name Combo Box name on form Emp_IDCombo and row source is SELECT Employees_table.Emp_ID, Employees_table.EmployeeName, Employees_table.Emp_Pics FROM Employees_table;
Text field is located in employees_table called [Emp_Pic] for images location.
Im using the below code to open a from depending on what option is selected on a combobox.
Code:
Private Sub DirectPCombo_Click() Dim cboVal As String Dim stDocName As String cboVal = Me.DirectPCombo.Value Select Case cboVal Case "One"
[code]....
If you select the first item [One] it will open the correct form [TestOne]. But when you select any of the others an error comes up saying that the name is no a form. So I added
Code: DoCmd.OpenReport stDocName
But the no items would select.I know If split the reports form the forms and make two comboboxes it would work, but it would be better it both could be in the same combobox.
I have a form "IntUnderwriterSearchByName" which is based on the query "Search by Name". This form opens with a parameter (please enter name of broker) and is set out like a datasheet with the following fields- "Broker Name", "Domicile", "Broker Code" and a couple of others. I'd like to be able to click on a record and open the form "IntUnderwriterPopUp" so that the details of that specified record are displayed.
Broker Code is what I'd like the form to look for and this Broker Code is unique for every one of the 900 or so records. This code can be numerical e.g. 01233 but also can be a mixture of both e.g. EU2885. It is also worth noting that this code is not the primary key- i have an autonumber (called ID) that does this- but this field does not appear on the form.
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.