Open A Form From A Combo Box
Aug 29, 2005Hi all,
The title says it all; how can I make a form appear when something is selected from a combo box?
Thanks in advance,
Atholl
Hi all,
The title says it all; how can I make a form appear when something is selected from a combo box?
Thanks in advance,
Atholl
I have a form with a subform which has a lookup table (combo box) as a field. I want to be able, when I select a certain item in the lookup to have it automatically open a form. e.g. A field called insurance class - I select motor, I want the motor details form to open. If I select Fire, I want it to open the fire form and so on. I have already created the forms. Please help!
View 14 Replies View RelatedHello,
Please help, I am still kind of new to Access. My problem is. I need to be able to open a form from a selection of a combo box. Thank you in advance.
Hi,
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????
Thanx
Hi I've tried to find an answer to this but having no luck.
I have a form that has two combo boxes the first box looks up the year from the project table and the second box the project number. I want to open the project details that correspondes to these two input values within the combo boxes by pressing a command box.
I've tried the following but just get a syntax error:
Private Sub cmdOpenJobDetails_Click()
On Error GoTo Err_cmdOpenJobDetails_Click
Dim strDocName As String
Dim strYear As String
Dim strJobno As String
Dim strFilter As String
strYear = Me.cmbYear.Value
strJobno = Me.cmbJobno.Value
strFilter = "Select [tblProjects].[intprojectyear], [tblProjects.[intprojectjobno] FROM [tblProjects]" & _
"WHERE [intprojectyear] = & strYear And [intprojectjobno] & strJobno"
strDocName = "frmProjectDetails"
DoCmd.OpenForm strDocName, , , strFilter
Exit_cmdOpenJobDetails_Click:
Exit Sub
Err_cmdOpenJobDetails_Click:
MsgBox Err.Description
Resume Exit_cmdOpenJobDetails_Click
End Sub
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 main form (FRMProspects) with a combo box (ComboCoName) that has a query as it's record source to sort the records displayed in it. It is bound by the CustID (autonumber), but displays the CompanyName.
What I want to do is open a sub form FRMNotes, based on the Company name that is selected in the ComboCoName. So for Company XY, I want to click on the Notes command button to open up all the notes for that company only (filtered). FRMNotes is based on a different table, but TBLProspects and TBLNotes are linked by CustID (one to many).
What code do I need for this? I am treading water with VBA!
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
Thanks in advance to all
I have designed a main form which have buttons for about 30 different companies name to open, each button opens an individual company form. Now the companies list is growing day by day so i want to create a combo box which select the company name and open the relevant company's form.
Do I need to create a table which lists all the companies and then add a combo box on a main screen which select the company name and open the form but i need a VBA code for that.
Hey guys, I'm not sure if this is possible, and it is the most challenging thing that I have tried to implement into my database to date.
What I have is a booking form which allows you to Add Bookings for camera kits.
When a customer comes in and would like to book a kit, the form must be filled in with the relevant details, I have 2 combo boxes on this form.
The first is the Kit selection, there are 5 camera kits.
The second is an option to book the full kit out, or just components.
So here's the tricky part...
When the first combo box selection is made (eg. Kit 3) I need the Kit3 table to be active.
Then, when the user selects "Components" from the second combo box, I need a form to open up based on both of the above.
So a form based on tblKit3 would be opened and the user can manually select the components that they require to be booked out.
Any help at all would be appreciated.
I have "donations" form with a cbo called "DonationType".
(frmDonations.DonationType)
General
Employee Match
Employer Match
Angels*
Friends*
Royal Crown*
The last three options need to redirect the user to a different form used for pledged donations.
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 RelatedI have been trying to modify a sample database to suit what I want to do but I am getting stuck on the very first part cascading combo boxes i want to open a form and add multiple items to a table - first i want to select, from a combo box a department - then select a supplier from all the suppliers/manufacturers related to that department then select a stock item based on the description from all the items available from that supplier
I have attached the database I am using to modify and my database.
Seasons Greetings to all.. I hope you didnt put on too much weight.
The fog at Heathrow ensured I had a very stressful Christmas.. but thankfully it has gone for now.
i have a question regarding choosing a report to open based on a combo list..
i have a field called jobtype..
this field will always have either
"CASH" or "ACCT"
i have 3 separate report designs.. 1 design for cash jobs, 1 design for acct jobs, and 1 deisgn for both jobs.
i want a form that will allow my user to choose which report to look at..
lets call it form1.. i want to place a combo on my form (combo1) that has the values..
CASH
ACCT
BOTH
i realise that in my report query source.. i can use the following as the jobtype criteria
[Forms]![form1]![combo1]..
Question
I need the combo to realise that if the CASH value is selected.. it should open the CASH report..
if the ACCT value is selected.. it should open the ACCOUNT report..
and finally if BOTH is selected then open the BOTH report..
how can i do this?
I created a simple form that has a dropdown of all the reports that a user can select. I am using the following command;
DoCmd.OpenReport "rpt_Roadshow2", acPreview, , "RoadShow.RSID = SelectSymbol.Column(0)"
Where SelectSymbol is the name of the ComboBox and Column(0) is the first column of that data field. When I run it I get
Run Time Error 3085
Undefined Function 'SelectSymbol.Column" in expression.
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.
View 3 Replies View RelatedIs it possible to open a pdf file that has been saved on a server?
What I have is a table that lists all of the files that have been saved to pdf. There is a column in that table that lists the exact path and file name. There is a combo box on a form that lists those file names. I need to know if there is VB code that will use that specific file name listed in the combo box and open (to view) the pdf file on the server.
Thank you so much for any help and insight provided.
I've got a combo box on my main form which lists different contractors. I've also created a command button on the main form which opens another form and allows the user to add another contractor to the contractor table which populates the contractor combo box on my main form.
However, when the user has added a new contractor and closed this form, this new contractor doesn't show up in the combo box until the main form is closed and reopened.
Is there a way to update the main form without closing and reopening it so that it shows the new contractor in the combo box?
Thanks in advance!
:confused: I have created a frame which controls two seperate combo boxes for searching based on either serial or name. What I'd like to do is have the user combo box [after update] to open a sub form with all of that specific users particular assetts. Only by that user.
HEre is the code for which I've already got. Also I've already created a query which controls the subform to find only a particlar users assets:
Private Sub Combo106_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Serial #] = '" & Me![Combo106] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo108_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Users] = '" & Me![Combo108] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub SearchFrame_AfterUpdate()
'Make the appropriate combo visible
If Me!SearchFrame.Value = 1 Then
Me!Combo106.Visible = True
Me!Combo108.Visible = False
Else
Me!Combo106.Visible = False
Me!Combo108.Visible = True
End If
End Sub
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 have a combo box containing "ProgramType". If "DDI" is selected from this combo box, I would like it to open up another combo box containing the contents from "tblDDI". Then I would like the selection to be transferred to "ProgramType". Is this possible?
View 5 Replies View Relatedwhen i open a form i want to open another frm at the same time. i have a main form with some buttons in it. when i click on a button and a form opens then i am not able to click on a button to open other forms from the main form.
View 2 Replies View RelatedI 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 ?
I have a form which runs specific queries and opens a report using combo boxes, these work perfectly fine if I just try to run them in the form. I have put the form into a navigation form and if I try to run the same query I get parameter queries popping up instead of just running the query and opening the report.
View 2 Replies View RelatedIs there a way to close a form that is open from another form that has the focus. I tried using the Unload event, but I received an error message "Cant load or unload the object". I would appreciate any help!
View 1 Replies View RelatedBasically I have a Customer Form, which I have a New party button on it,this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.I have tried the GoTo macro's but cannot seem to get it to work.
I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.