473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

to run a report or open another from from a Combo box

I have attached a table of two column to a combo box, which is of different option for searches, i want, if i select 1 from combo, it should run a report, if two then open another form and and other combo, have more option for more other reports, i think, enough explanation
Sep 1 '15 #1
1 906
Seth Schrock
2,965 Expert 2GB
The way that I would do that would be to add two more fields to your table: ObjectType and ObjectName. Make sure to change the combo box's column count property to 4. Then in the combo box's AfterUpdate event, add the following (I use the name cboObject as the name of my combo box. Change it to what you have):
Expand|Select|Wrap|Line Numbers
  1. Select Case Me.cboObject
  2.     Case "Form"
  3.         DoCmd.OpenForm Me.cboObject.Column(3)
  4.     Case "Report"
  5.         DoCmd.OpenReport Me.cboObject.Column(3)
  6. End Select
Sep 1 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Support4John | last post by:
a2k (9.0.6926) SP-3 Jet 4.0 SP-7 I have a form with combo box field that allows the user to select from the combo box or type in the field value that may or maynot be in the combo box field. ...
5
by: ddhung | last post by:
how to insert multible values by making one selection from combo box in forms. any way to code insert SQL in froms??
6
by: icony | last post by:
Hi everyone, Here's my problem. I have a report that i want to use with the command openreport. The report open and close in a fraction of a second. I cant see why i cant view the thing. Cause i...
5
by: sensreview | last post by:
Hello, I need help in selecting a value from combo list thru one lookup table and update different table on MS access form. For eg; I have a lookup table of usernames, I need to use this...
3
by: anirban | last post by:
I am a novice of VB I want to fetch data from combo box or list which is selected give me a easy way to select the data of combo box or list box I can show data in combo box or list box
1
by: Prashantsd | last post by:
I would like to sum the values from combo box and get the result in text box. I have three Combo box which has 2 columns each (Options and Ratings) Options (Ratings) Strongly Agree (50) Agree...
0
by: sapsy | last post by:
How can i extract report sql from my Crystal report using c# Thanks Rohit
11
Hiren Joshi
by: Hiren Joshi | last post by:
Hello All Experts, I am a Moderate VB Programmer. I am developing one Application at the moment with VB 6.0 and MS Access. Operating System is Win XP. Its a Multi User application. What I want...
3
by: kumardharanik | last post by:
Pls could anyone help me how to get data from combo box with my following code i used txt_app_code for combo box name. using System; using System.Collections.Generic; using...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.