I created a table listing all the different reports/forms and Crosstab queries i require, and wants to select the relevant reports/queries/or forms from there using the "after update" function, based on the Id field of the specific Report/Query or form in the "AllTblFinReports" table where i listed it.
When i use my vba code, it opens up all the reports/forms or queries at once.
finreports1 is a textbox using "=[finreports].[Column](0)" from the id field in the combobox - If IsNull(Me![facility1]) Then
-
Exit Sub
-
Else
-
If Me.finreports1 = "1" Then DoCmd.Minimize
-
DoCmd.OpenForm "frmViewcaptTrans", acFormDS, "", "", acEdit, acNormal
-
If Me.finreports1 = "2" Then DoCmd.Minimize
-
DoCmd.OpenForm "frmPharmTopmedsCnt", acFormDS, "", "", acEdit, acNormal
-
DoCmd.Maximize
-
If Me.finreports1 = "3" Then DoCmd.Minimize
-
DoCmd.OpenForm "frmPharmTopmeds2", acFormDS, "", "", acEdit, acNormal
-
DoCmd.Maximize
-
If Me.finreports1 = "4" Then DoCmd.Minimize
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "UpdateNPITID2", acViewNormal, acEdit
-
DoCmd.OpenQuery "UpdateNPITID3", acViewNormal, acEdit
-
DoCmd.OpenQuery "UpdateNPITID4", acViewNormal, acEdit
-
DoCmd.OpenQuery "UpdateNPITID5", acViewNormal, acEdit
-
DoCmd.OpenQuery "UpdateNPITID6", acViewNormal, acEdit
-
DoCmd.SetWarnings True
-
DoCmd.OpenReport "rptNPConsumeSummary", acViewPreview, "", "", acNormal
-
If Me.finreports1 = "5" Then DoCmd.Minimize
-
DoCmd.OpenReport "rptfutureexpire", acViewPreview, "", "", acNormal
-
DoCmd.Maximize
-
End If
I have tried all sorts of configurations with "elseif" and "else" and with "end if" without success.
Any suggestions will be welcomed please
1 1103
I am a fool - got it working by adding "end if" after each "if then" statement
Maybe somebody else can also learn from this "oversight"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Nick Douglas |
last post by:
I have a table with 50 fields, and a combo box which is set to 'field
list' to read the field names. I want to select report groups via
another combo box based on the field names the user selects....
|
by: Gene Hubert |
last post by:
I'm looking at using the result of DataTable.Select as the DataSource
for a ComboBox. Is there an easy way to do this with a minimum of
code. I tried to bludgeon it into submission by writing:...
|
by: Rahul Chatterjee |
last post by:
Hello All
I have designed a dotnet application using VB which basically takes a
selection and passes value to a crystal report which in turn passes the
value to a Stored procedure. After the...
|
by: Evan Camilleri |
last post by:
How do I add a column 'Select...' to a databound Combobox? ... So that
users will see that?
In windows application.
Evan Camilleri
|
by: c_shah |
last post by:
I am a beginner and learning VB.net
There are two wasy to bind a combobox or a listbox
First approach is to assign a datasource and displaymember
Second approach is to iterate through datarow...
|
by: jodleren |
last post by:
Hi!
I use this to read on the value of my "parent" window.
stemp=window.opener.document.forms.workgroup.value;
Works well.
Say, I'd like to add an items to that, and select it?
|
by: Gilberto |
last post by:
Hello,
I need the user to be able to select the language of some reports. Right now every product has already its current french and english name. And I was about to simply create another whole...
|
by: alphaomega3 |
last post by:
I'm back with a new set of problems with the old NCR database from a year ago.
I have a form that is for Nonconformance Entry. In the process of entering this form if the supplier for the...
|
by: yogeshtiwarijbp |
last post by:
Hi All,
Iam new in asp.net 2003 and sql server. I have to create an application having following criteria.
Proposed Steps
1. Create a table containing fields as Name of Report, View Name or...
|
by: sjarmy |
last post by:
I am using javascript to make a dropdownlist act like a combobox and it is work well. The issue I'm having is when the user types in the combobox and finds the selection he wants, he has to use the...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
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...
|
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: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |