How Do I Reference A Parameter Value?

Oct 22, 2004

Hi,

I have designed a report and the underlying query has a parameter that pops-up whenever the report runs. I want to print the value of that parameter in the report header. If I just reference it exactly how it is in the query, while the report runs, it asks for the value of the parameter again! Once with the underlying query and once with the report... How do I ask for the parameter value just once and get the data records filtered using that value as well as print the parameter value?

Classic example of use: I want the report to print records upto a certain date. The date is the paramter value. I want to filter the records based on this date and print the date in the header.

Thanks!

View Replies


ADVERTISEMENT

Combobox Reference Showing Up As Parameter

Apr 6, 2014

I made a form that has a combobox that references the combo box above it, and it all worked fine, then I moved it into a navigation form and it stopped working. This was because the source was still using the static reference of the standalone form, not the subform it is now. So I've changed the row source a number of times, but each time, when run, access fails to find it, instead asking for a parameter to be input. The lines

The Nav form is Navigation_Form, the subform is MCR_Log, the combo box is Affected_Subservices and the referenced combobox is Affected_Services.

Code:
Forms!Navigation_Form!MCR_Log.Form!Affected_Services
or
Code:
Me!Affected_Services

does not work, even if I change the bangs and dots around. I can't attach the file to this forum, so here is a dropbox link to have a play around.

Bonus Question, I want the first combobox to accept multiple arguments, and the second to display all the subservices under each service, would the record source for that look something like

Code:
SELECT Subservices.Subservice FROM Subservices WHERE Subservices.Parent = Me!*Affected_Services*;
?

View 6 Replies View Related

Queries :: Reference Another Query Based On Date Specified As Parameter

May 16, 2013

Within a query, I'd like to reference another query field based on a date specified as a parameter.

In my query, there are fields for each month: [January],[February], etc.

I have a field titled [Current Month], based on the parameter [As Of Date]. So if when running the query, the parameter pops up and I type 5/6/2013, it knows that the month is May. I know how to return May in the current month field (format([As Of Date],"MMMM"). But how to I return the value that is in the May column?

View 3 Replies View Related

Capturing Parameter From Parameter Query

Jul 12, 2005

I have a form whose data source is a select query, q3, that is built from 2 other select queries. I'll call them q1, q2, and q3. q1 is a parameter query where I enter a "Cutoff Date" that the 3 queries manipulte and generate the desired results that appear in the form. The problem is that I don't know how to capture the parameter "Cutoff Date" from q1 to display on the form.

View 2 Replies View Related

Reference

Feb 24, 2006

Please help, how can I refer to the field of a subform in Visual Basic when the (main) form is open?

A)
Private Sub supplierID_AfterUpdate()
Forms![invoices]![KombináltLista4].Requery
End Sub

B)
Private Sub supplierID_AfterUpdate()
Forms![details1 Segédűrlap]![KombináltLista4].Requery
End Sub

These don't work. (The main form: INVOICES; the subform:DETAILS1 Segédűrlap; KombináltLista4 is the name of a combo box)

The version B work, when I open the form and the subform together, but of course I'd like to work only on the form (where the subform is displayed as well, but I can't refer to it...)

THX

View 3 Replies View Related

How To Fix A Reference

Feb 24, 2005

I created a new database and i am getting an error.

Your ILFdatabase database or project contains a missing or broken reference to the file 'SearchCtrl.ocx' Version 1.0

Can anyone help?

View 1 Replies View Related

Parameter Query Asking For Parameter More Than Once!

Nov 9, 2006

Hi,

I have a query that requires a Start-Date and an End-Date to be input by user for the Where clause. It is asking for both over and over. I've had it ask from 1 up to 4 times! :eek: Shouldn't it store the input and only ask for it once? I'm thinking that the way my query is arranged may be causing it to have to loop through that section more than once to find the data, but that's just my theory. Any help would be great!

Here is my code (abbreviated slightly):

SELECT DISTINCTROW C1.*, C2.*
FROM Pen AS C1 INNER JOIN Jobs AS C2 ON C1.subno=C2.[Jobs Acct]
WHERE ((C1.typ="SS" Or C1.typ="CC" Or C1.typ="PP" Or C1.typ="TT") And C1.stdate>=[Enter Start Date] And C1.stdate<=[Enter End Date] And C2.[Type]<>"EE" And C2.[Type]<>"QQ" And C1.entdate<=C2.[ChangeDate]+60);

I'm selecting rows from "Pen" and "Jobs" that have the same subno/Jobs Acct numbers (text), then there are criteria for "Pen" types, user inputs criteria for date range (Start Date and End Date) and there are criteria for "Jobs" types. Finally, there's a cross-table criteria based on a date field ("Pen" entdate should not be more than 60 days past the "Jobs" ChangeDate). Tables are in quotes in my explanation here.

So running the above, it asks for user input "Enter Start Date", then again for "Enter End Date"...but then it asks for each again...and again...and sometimes again!

Help! :confused:

P.S..I didn't notice this repeating until I made it user input (parameter query) because it was using whatever dates I hard-coded in there before.

View 2 Replies View Related

Change A Reference

Apr 29, 2005

I need to change the reference "Microsoft Access 9.0 Object Library" in Access 2000 with the "Microsoft Access 11.0 Object Library" but I can't de-select it 'cause it's used by the program. Another problem is that I tried to import the 11.0 copying the file and when I select it from the panel control it seems to import without problems, but when I search it in the list, the 11.0 doesn't exist.
How can I import it?

View 2 Replies View Related

Best Access 03 Reference?

Nov 1, 2005

Heya,

In your opinion, what is the best Microsoft Access 03 Reference book for learning?

Mateo

View 2 Replies View Related

Reference Problem

Jan 12, 2006

Hi, I have been designing a database on my computer which seems to be working fine; 2 more users in the company should be able to use the database.In order to see if everything was working properly on other computers, I have put a copy of my db on the server and tried to open it on the other users computer station. Unfortunately, the reference library that I have been updating during the design of the database doesn't seem to apply to the other computers. I have been trying to update it on the other machine but the references on the tool menu in open module is not available.
I didn't expect this to hapened and I am not sure what to do, what would be the apropriate method to make the library available to the other computers?

View 4 Replies View Related

Reference Calendar

Aug 19, 2006

Is there a way to insert a calendar on a form from which a user can select a Month year and day similar to using the calendar on Outlook or Lotus Notes to set up or view appointments or meetings?

View 5 Replies View Related

Reference Problem In An MDE.

Apr 19, 2007

Hi,
I have created an mde that was installed on more than 30 computers. All of them work fine but one who gets a message saying that there is a broken or missing reference. How can I repair this knowing that I cannot access the references in a mde?
Thanks!

View 3 Replies View Related

Adding Reference

Feb 6, 2008

Hi,

I have an SDK that I normally use with VS.NET. I cannot seem to add the .dll as a Reference in my MS Access 2003 database. Is there something I am doing wrong, or a workaround to get it to work? I have .NET 3.0 installed on the PC.

Thanks,

View 1 Replies View Related

Subform Reference

Apr 7, 2008

Hi,

I have a form (frmSWL) with a subform container on it (subfrom1) which has a source object called frmSite. How do I reference frmSite from another form so I can apply a filter to it??

I am trying:

forms!frmSWL!frmSite.Filter = "......."

, but it is not working.

Thanks,

View 3 Replies View Related

Reference Another Table

Oct 18, 2004

I'm trying to achieve something that I'm sure someone has figured out long ago. I have a DB that currently only shows the zip code for certain records. Is there a way that I can have the DB take the current zipcode, reference a zip code table, and then return both the zip and city/state?

Thanks

View 1 Replies View Related

Reference Number

Aug 29, 2006

Hi guys/gals

My primary key, RefNumber, is a sequentual Autonumber field. I want to creat my own Custommade autonumber field, but the catch is:
My autonumber field should have any of the following (selectable by the user from a combo box from a Form) attached in front of the number: DPR,DPZ,DFE,DGL,DMI,DGJ or DPE.
ie: the autonumber is at 14. The user selects DFE, but this is only the seconde choice made of DFE.

So the end product should be: RefNumber = 14
.........................................DistrictR efNumber = DFE2 or DFE002

Help please?
Thanks in advance

View 5 Replies View Related

Reference Problem

Apr 30, 2007

Hello, I have been struggling with this for a while, and I'm hoping I can get some help. The problem I have relates to three tables. I pulled the tables off to the side to show the current relationships between them; Please see attached.

Here is my setup. I created a form that has all the fields in tblEntry, and a combo box whose record source is [EmployeeID] in tblEmployees.

The problem, when the user selects from the combo box, I am getting an entry for the field [EmployeeID] in tblEntry, but I am not getting an entry for [CategoryID] from tblCategory. Basically, I want the user to be able to select one thing and to get two entries: [EmployeeID] and [CategoryID].

Can anyone help me?

Thanks.

View 5 Replies View Related

Reference Date

Dec 3, 2007

I have StartDate and EndDate fileds where I enter the date and time the employee starts and finishes his shift (in dddd dd mmmm yyyy hh:nn AM/PM format). However there is a penalty issue that starts at 7.00 PM.
How do I set up a non changing reference for 7.00 PM that I can reference to make a calculation.
For example I need to calculate penalties for when the employee works hours past 7.00 cutoff time.

I would appreciate any assistance to solve this problem

Thanks

View 7 Replies View Related

Reference Date

Dec 3, 2007

I have StartDate and EndDate fileds where I enter the date and time the employee starts and finishes his shift (in dddd dd mmmm yyyy hh:nn AM/PM format). However there is a penalty issue that starts at 7.00 PM.
How do I set up a non changing reference for 7.00 PM that I can reference to make a calculation.
For example I need to calculate penalties for when the employee works hours past 7.00 cutoff time.

I would appreciate any assistance to solve this problem

Thanks

View 1 Replies View Related

Reference Last Result

Dec 4, 2006

I am writing a query to calculate a running value, looking at the result of the line above and adjusting the running value in relation to new criteria. Make sense ?

For example

I have a number of dates which each have a value (a) against them dependant on the value in (a) I want to reward it in different ways and store the result in (b), I then want to look at (b) in the result of the above line in acessing how I will reward the next record.

Basically I want to read the value of the result of the line above when calculating the next line ? So it is basically cumulative through the query.

ps just found this forum so sorry for postiong a question first but any guidance appreciated.

View 2 Replies View Related

SQL Reference Sites

Jan 1, 2006

Which ones are the best?

View 1 Replies View Related

Having A Reference Problem With VBA

Mar 23, 2006

Well, thanks to SJ McAbney I have a nice chart on referencing subforms from the main form and what not. I'm still having trouble making it work, so I am sure there is something that I don't understand here.


Private Sub cmdNewCat_Click()
Me.frmNavSNewCat.Visible = True
Me!frmNavSNewCat.Form!txtCatParID = Me.txtCurrent '<---This is the one the debugger highlights.
Me!FrmNamsNewCat.Form!txtCatName = ""
Me!FrmNamsNewCat.Form!txtCatNote = ""

End Sub


When I click the cmdNewCat Button, I get this error:


Run-time error '-2146500594 (800f000e)':

Method 'Form' of object '_SubForm failed


Anybody know what I'm doing wrong?

View 3 Replies View Related

Missing A Reference?

Sep 27, 2006

I must be missing a reference somewhere, but I have a form with several calculated fields in it, with the control source as =DateDiff.... They were working fine last week, but now all it displays is #Name?. What happened? I've looked at my references and none appear to be missing. WHich one do I need to add to make this work again? Thanks for you help.

View 4 Replies View Related

Turn On DAO 3.06 Reference

Nov 24, 2004

I am using Office 2003. I tried entering this line of VB code :
Dim Db As Database
but got the following error :
Compile error : User defined type not defined

checked the net, which said to open the module window, go to Tools>References and check the DAO 3.06 box... but it said in Office 2003 i dont need to do this...Anyway i tried looking at the references but DAO 3.06 is not even there... pls tell me what to do

View 2 Replies View Related

Reference Files

Feb 8, 2005

i have a number of references missing in my DB, where should i dload or load new ones.

will they be on the disc?

Cheers

Andy

View 1 Replies View Related

Any Way To Individually Reference A Tag?

Aug 13, 2013

I can see how to iterate over all the controls to find the Tag collection, then do something with it.

Problem is that since I know the name of the tag, I just want to do something with it (height, visibility, etc). But I can't figure out how to reference a tag directly without iterating over all the controls.

Something like me.tag("tagname").height=0

View 8 Replies View Related







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