Open Form On Two Combo Box Values

Sep 17, 2006

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

View Replies


ADVERTISEMENT

Forms :: Open A Form Together With Their Values

Dec 5, 2014

I have made a main form(ApplicantList) and another form(ApplicantDetails) for new applicants which the the DataEntry Property set to Yes now my concern is If double click the LastName of FirstName value on the main form I want to popup the second form which has have all there information..

View 10 Replies View Related

Forms :: Open Form Based On Table Values?

Sep 8, 2014

I have a table with the fields Thermometer_ID (primary key) and CalibrationType (combo box list with the options of InHouse or SendOut)

I want the user to click on a button and have an input box to input the thermometer_id. Then if the CalibrationType is InHouse open form Verification and if it's SendOut open form Thermometers.

View 2 Replies View Related

Open A Form From A Combo Box

Aug 29, 2005

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

View 2 Replies View Related

Open Specific Form From Combo Box

Nov 12, 2005

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 Related

Open A Form With A Combo Box Selection??

Nov 24, 2005

Hello,

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.

View 3 Replies View Related

How To Open A Form On A Particular Record Using A Combo Box

Aug 1, 2006

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

View 1 Replies View Related

Forms :: Open Form From Combo Box

Jun 3, 2014

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.

View 2 Replies View Related

Open Subform Based On Form With Combo Box

Oct 27, 2005

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!

View 4 Replies View Related

Combo Box Selection To Determine Which Form To Open

Jul 13, 2005

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

View 6 Replies View Related

General :: Open A Form Through Combo Boxes

Sep 19, 2013

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.

View 14 Replies View Related

Open Relevant Form Based On 2 Combo Boxes?

Apr 6, 2006

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.

View 1 Replies View Related

Forms :: Open New Form Based On Combo Box Selection

May 26, 2013

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.

View 2 Replies View Related

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.

View 4 Replies View Related

Ghost Values In Combo Boxes In Form!

Dec 2, 2004

I have set up a nice timesheet form now with lots of help on this forum.


I have a form with a subform(1) which has another subform(2). The form is NOT in Data Entry mode, so users can select their name from the main form, the period from subform(1), and then enter/edit timesheet records in subform(2). In subform(2), I have some combo and text boxes for each record. The first is cboProjectSelect. Column(2) of the selection made in cboProjectSelect is entered into tboProject. Additionally, the selection made in cboProjectSelect filters another combo, cboWorkstream. The records are displayed in datasheet view (I know I've been advised against this, but I've had to do this, because the users want to see all records as they enter their timesheets)

All this work beautifully....for the first record. For some reason, when you enter any subsequent records, it blanks out the values in the tboProject and cboWorkstream boxes for all records! If you click in any of them, the correct value appears, if you click away, it disappears.

The proper records are being entered in the relevant queries and tables, so everything is working fine. It's just annoying that the boxes go blank!

Any idea if there is a way to ensure the values don't disappear?

thanks in advance.

View 4 Replies View Related

Cascading Combo Boxes - Open A Form And Add Multiple Items To A Table

Mar 12, 2011

I 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.

View 5 Replies View Related

Forms :: Adding Combo Box To A Form Depending On Input Values

Sep 23, 2014

I want to add a combo box to a form, where depending on the values entered in the box another combo box would show more values. In other words, if the first combobox had choices of 1, 2, 3 and 4, if 1 was selected the next combo box would have values a, b, c and d. If 2 was selected, it would have values of a, d, e, f and g.

View 2 Replies View Related

Forms :: Requerying Values In A Subform After Updating Combo Box In Main Form

Apr 21, 2015

Within my main form I have a combo box called "workgroup." Also in the main form is a subform called "sfrmSubmissionRecords," and within this subform is a combo box called "covermemo."

Each cover memo is assigned to a specific workgroup, so my intention is for each time a new workgroup is selected from the dropdown, the covermemo combo box in the subform becomes populated only with the covermemos associated with that workgroup. I'm almost finished except for the final step when I try to make the values regenerate...Access says that can't find the referenced form "sfrmSubmissionRecords"

This is the code that I'm using:

Private Sub cmbWorkgroup_AfterUpdate()
Forms![sfrmSubmissionRecords]![cmbCovermemo].Requery
End Sub

View 2 Replies View Related

Modules & VBA :: Query To Compare Values To Show All Records Where Form Combo Value Is Selected

May 1, 2014

I am building a tracking database where we would be able to track information which field are null data and report them to our Administration to fill the null data. For this I have created a form name "Search" and I have a combo box control on that form which is bound to "Table = employee" and its ROW SOURCE TYPE="Field List", I would like to able to query records where the selected value in this combo box is null through out the table.

For example if I select "Telephone" from this combo box dropdown, I would like the query to show all the records where the "Telephone" is null, how to set the criteria in query to take the combo box value as "Field Name" and then compare it with the Field/Column in the table and show the null values.

View 4 Replies View Related

Forms :: Populate Combo Boxes With Values Depending On Selected Value In Previous Combo Box

Aug 5, 2013

I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.

Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...

View 1 Replies View Related

Constraining Combo Box Values Based On The Value Selected In Another Combo Box

Sep 7, 2006

Thanks in advance for your help.

I would like to set up rules/constraints such that the value selected in combo box A determines the available values in combo box B. For example, "Combo box A" is bound to the [PartnerType] field and "Combo box B" is bound to the [PartnerRole] field. Let's say that the two choices in Combo Box A are "LLC", "LP", and "Corporation". There are 5 possible choices in Combo Box B: "X", "Y", "Z", "Q", and "U". If a user selects "LP" in Combo Box A, I would like Combo Box B to only show choices "X" and "Y". And if a user selects "LLC", only choices "Y", "Z", "Q", and "U".

Similarly, I would like to set this up so that Combo Box B is not initially visible--it becomes visible when a user selects "LLC" or "LP". If a user selected "Corporation", Combo Box B would remain hidden.

View 2 Replies View Related

Forms :: Combo Box With Values Based On Another Combo Box

Jun 25, 2013

I have a main form that filters data in a subform based on selections via combo box users make on the main form.

So I have the 'department' and 'manager's name'. If someone selects 'Human Resources' from 'department' combo box, then I only want to see the managers that are in the Human Resources departement when I drop down the combo box for 'manager's name'. Currently I'm seeing all the managers and a user can select a manager that is not in human resources and get no data returned. I prefer for him to get a list of those that are in that department only. The source of the combo box is a query.

I got it! Found here: [URL] ....

View 3 Replies View Related

Combo Box Values Based On Another Combo Box Selection

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

Open Report From Combo

Dec 28, 2006

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?

View 7 Replies View Related

Open Report From A Combo Box

Jul 9, 2013

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.

View 5 Replies View Related

Use Combo Box Selection To Open The Table

Feb 17, 2005

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 Related







Copyrights 2005-15 www.BigResource.com, All rights reserved