Prompting For Parameter - Why?

Dec 12, 2005

Hello,

I have a table which contains:

InvNo - Autonumber (invoice number)
AccNo - Clients account number
Amount - Amount of invoice

I also have this data (minus the InvNo) in a linked spreadsheet. I would like to keep the spreadsheet as it is all set up for the printing of multiple copies etc.

The idea is, I want to import the data from the spreadsheet into the database, which will then apply an invoice number (because it is an autonumber), and then get that invoice number back into excel.

I have done it all, but cannot get it to give me the invoice number assigned to it.

I thought I would have a simple query that looks for records in the table that are the same account number, and amount (plus a few others I havn't included here), and then it could return the InvNo.

But, whenever I run the query, it asks me to specify the parameter, it doesn't seem to be able to read from the linked spreadsheet (it is openable, I can open it in access just fine).

In the query I have put (under criteria): "[LinkedSpreadsheet]![AccNo]" (and similar for the other fields I want to match).

What is wrong?

Thank you!

View Replies


ADVERTISEMENT

Parameter Prompting Multiple Times?

Aug 15, 2011

I have a report with a subreport. I have added a parameter to the query to prompt for [manager] or is null to get all managers. However, on the report when I enter a manager my count on the subreport still returns the count for all. So, I added the same prompt to the query for the subreport. It returns the right count, however, it prompts for the manager multiple times. How do I get it to prompt only once yet get the right total?

View 1 Replies View Related

Prompting For A Date?

Feb 17, 2005

Can I get my query to prompt for a specific date somehow?

Or....I am running a report off my query, can I get my report to prompt for a specific date?

View 1 Replies View Related

Prompting A Crosstab

Nov 14, 2007

I have a crosstab query and I want to prompt users for certain colunms is this possible. If so how, I want to prompt the users to enter month.

View 2 Replies View Related

Prompting For Specific Dates

Aug 16, 2005

Hi all
Im wanting to open a sales report, but I want to be prompted to enter dates FROM and TO so that I can get specific sales.

Example

"Enter start date" here i'd enter 1/8/05
"Enter end date" here i'd enter 31/8/05

that way i'd get all sales throughtout august. Then when september comes round I could enter new dates and save me having to go in and change the filter.

Can anyone help?

Thanks

View 3 Replies View Related

Reports :: Expr1 In Query Keeps Prompting

Oct 24, 2013

I have a for form with a button to run a report. The report runs a query. The query reads data on the form to feed the report. The data that is from the table works fine but data from a text box on the form will not. It prompts for EXPR1.

In my query I have the following:

EXPR1: [Cnum]

[Forms]![FRM-Customer]![Cnum]

where FRM-Customer is the form with the button to run the report and Cnum in the text box data that I want to pass to the report. Every time I run it it prompts Cnum?

View 5 Replies View Related

Prompting Save Message Before Moving To New Record

Oct 25, 2005

Hi all,

I Have a form bound to a table.

The form will be used by poor experienced users so to avoid problems i would like whenever we move to a new record(or changing the contents of a stored one) a save record message to appear refering to the one we are just leaving.
Generally i would like a solution which will restrict users from entering data by mistake using scroll mouse or ctr+page down.
If i could design it ,i would choose that nothing in the form is saved until a save all button is clicked.This means that the user will enter virtually as much data as he likes but they will be stored in the table only when the button is clicked,but i don't know if this is possible since my form is bound to table.
Thank you all in advance,
black ailouros

View 1 Replies View Related

VBA OnClick -- Prompting User For More Than One Required Field

Jun 21, 2005

I'm using VBA to prompt users for two required fields. One I can do, but with more than one I get into issues like only 1 message box appearing at a time. If both fields are blank I want both messages to appear. Here's my code, it's in an On click function:

If IsNull(req_file_num) = True Then
MsgBox "Required field: File #. The appropriate file number must be entered before this PO's status can be changed to Filed."
GoTo Err_Command_158_Click2
End If

If Not [req_filed_date] Then
[req_process_status_rec_id] = 8

MsgBox "Your changes have been processed. This purchase order now has a status of Filed."
DoCmd.Close acForm, "frm_req_file"
GoTo Err_Command_158_Click2
Else: MsgBox "Required field: File Date. The appropriate date must be entered before this PO's status can be changed to Filed."
GoTo Err_Command_158_Click2

End If

Err_Command_158_Click2:
End Sub


I realize that it only shows one message box because I have the GoTo Err_Command_158_Click2 command, but I couldn't figure out how else to keep it from continuing through the code. If both "req_file_num" and "req_filed_date" are null, then I don't want the "req_process_status_rec_id" to change to 8 and have the form close.

Thanks for your help!

View 2 Replies View Related

Modules & VBA :: Prompting User To Select Answer

Aug 7, 2013

I'm trying do a Select Case on a form control where the user is prompted for information depending on the value in the control.

Here's a generic example:

If field1 = "Vegatable" then
Select 1 for Brocolli
Select 2 for Lettuce
Select 3 for tomato

If field1 = "Fruit" then
select 1 for "Banana"
select 2 for "Apple"
select 3 for "Peach"

View 9 Replies View Related

Prompting User To Accept Or Decline Potential Duplicates While Importing Excel Table?

Jun 28, 2013

I have a database table to which I will be adding multiple records from various other contributors. I would like to build a simple, import-friendly excel table that I can mail out to others, so that they can fill it out and send it back to me. Then I will save import steps as a macro or something similar, so that I can easily import their data.

The hard part is that I would like a way for Access to compare the new records with the existing records, identify potential duplicate records by predetermined criteria (in other words, 'wild-carded' to some level of specificity, since duplicates could be off by just a few characters), and then prompt me to examine each record to be imported alongside however many existing records that have been identified as potential duplicates. Then I as the user could:

1. accept the import record as a new record

2. decline importing that record since it is a duplicate of an existing record, or

3. edit by hand an existing record that is a duplicate of the proposed import, but may require additional information, and then decline to import the new one.After each prompt, I would like the import process to continue to the next potential duplicate, and when there are no duplicates, to complete the import and display a message box that says "Import complete".

View 6 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

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

Parameter

May 28, 2005

Hi all,

Can i populate a parameter just like i populate a combo box?

I want to have a FIXED value for parameter. May I know how to do this.


Thank you

View 3 Replies View Related

Parameter Value

Jul 31, 2007

Hi,

I am creating a database for work and I keep getting a message that pops up when I opn my form that says "tblClientBFinfo.ClosedReason". Then there is a place to enter a value and and it says "ENTER PARAMETER VALUE." I know it is a problem with one of my tables, specifically the "closed reason" field in the table. But I odn't know why it is asking me to enter a parameter value. Could anyone offer help?

Thanks!

View 3 Replies View Related

Parameter

Jul 6, 2005

I need a new parameter in my query. When I open the query i need the parameter to be asked in a combo box or drop down box or any way to select the value from the groupo other than typing.

View 1 Replies View Related

Help On Parameter

Jul 6, 2005

I need a new parameter in my query which enables me to select from a field in the table rather than typing .

View 1 Replies View Related

Parameter Help Please

Feb 9, 2006

I want to run a query automatically in the gotfocus event of a field within a form.
Prior to the gotfocus, a value is entered in an unbound text box on the form and I want to use that value for the maximum value in the parameters. I will set the minimum to zero.

My code errors in the where, it has no problem with the serial number but I can't seem to set the deliv_no to pull the value entered on the form.

SELECT Sum(VOLTEST.unc_del) AS SumOfunc_del
FROM VOLTEST
WHERE (((VOLTEST.SERIAL_NO)=[Forms]![largeVolume1]![serial]) AND ((VOLTEST.DELIV_NO)>0 And (VOLTEST.DELIV_NO)<=([Forms![largeVolume1]![No_del])));

I figure this is a syntax problem. Can you guys see where I have gone wrong?

I need the value to write to the table, not the form when this runs.

Thanks, GG

View 1 Replies View Related

Yes/no Parameter

Aug 10, 2006

In my chart I have a yes/no field that I would like to set up a query to for. I want the user to be able to input yes or no and then the data be displayed. Whenever I enter yes or no when the prompt comes up, I get an error saying the expression is typed incorrectly or the data is too complex. How do I set it up so the user can select yes or no in some way? thanks

View 5 Replies View Related

Parameter Box

Feb 1, 2005

Hi all.I have a form that links to another form using the following macro "[homerid]=[Forms]![Homer Input]![homerid]" so when I click on form 2 the homerid from form 1 is automatically displayed. However on my switchboard I have a direct link to my Form 2 but when I click on this i get a box come up which is titled "enter parameter value" and then the subtitle is "[homerid]=[Forms]![Homer Input]![homerid]", this is fine, but I would like to change the subtitle to something i write myself such as "please enter homerid". Is their a way of doing this? Thanks.

View 2 Replies View Related

Asking For A Parameter

Sep 22, 2006

Hi,

I have been programing SQL for almost 3 years now but, am a newbie with access. I have just added a field to a form used by employees to enter time and am getting a parameter request when the user clicks Add Entry. I placed a msgBox before the insert line and noticed the field data (type memo) is being sent by the insert query as an integer (without quotes). Any ideas how I might get the insert to pass the Comments field as a string?

Thanks,

~Leo


Private Sub AddTimesheet()

On Error GoTo Err_AddTimesheet

Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
'
Set db = CurrentDb()
'

strSQL = "SELECT * FROM tblTimeCard "
strSQL = strSQL & " WHERE [EmpID] = " & Me.cboEmp
strSQL = strSQL & " AND [Category] = " & Me.cboCategory
strSQL = strSQL & " AND [Week] = " & Me.cboWeek & ";"


'

Set rst = db.OpenRecordset( _
strSQL, dbOpenDynaset, dbReadOnly)

'
With rst


If Not .EOF Then

MsgBox ("Time sheet for this employee, category, and week already exists. Please click the record at the bottom of the screen to edit.")
Exit Sub
End If

End With

strSQL = "INSERT INTO tblTimeCard (EmpId, Category, Week, Hours, Comments, CreateDt, CreateID) SELECT "


If IsNull(Me.cboEmp) Then
strSQL = strSQL & "null, "
Else
strSQL = strSQL & Trim(Me.cboEmp) & ", "
End If

If IsNull(Me.cboCategory) Then
strSQL = strSQL & "null, "
Else
strSQL = strSQL & Trim(Me.cboCategory) & ", "
End If

If IsNull(Me.cboWeek) Then
strSQL = strSQL & "null, "
Else
strSQL = strSQL & Trim(Me.cboWeek) & ", "
End If

If IsNull(Me.txtHrs) Then
strSQL = strSQL & "null, "
Else
strSQL = strSQL & Trim(Me.txtHrs) & ", "
End If

If IsNull(Me.txtComments) Then
strSQL = strSQL & "null, "
Else
strSQL = strSQL & Trim(Me.txtComments) & ", "
End If

strSQL = strSQL & "'" & Now() & "', "
strSQL = strSQL & "'" & Trim(Me.txtLogon) & "' "

'Before Insert
MsgBox (strSQL)

DoCmd.RunSQL strSQL

'After Insert

Me.Refresh

Exit_AddTimesheet:
Exit Sub

Err_AddTimesheet:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_AddTimesheet

End Sub

View 5 Replies View Related

HELP!! How Do I Get Rid Of Parameter Value?

Oct 29, 2004

Hello,

I do not know what I did but now when I open my database it asks me over and over again to "enter parameter value" and it won't let me open the database like normal. Please help!

Katie

View 3 Replies View Related

Easy Parameter Qry

Jun 15, 2005

Set Start & End Dates

I have a list box that lists the 52 week numbers of the year

week 1 being 26-03-2005 to 01-04-2005
week 2 being 02-04-2005 to 08-04-2005....etc.



My aim
By choosing a week no all the records within that date will be returned


I am trying to do away with having to type the start and end date each time a search is carried out

I need to be able to click on the week no and from that the results are shown. perhaps in another list box or something

Any thoughts on how to make this sort of thing work?

thanks

View 9 Replies View Related

Storing A Parameter?

Jul 27, 2005

Hello,
I am designing a query as i have been advised in the following Quote:
Doc ManNow, you write a couple of queries. As a parameter to the queries, choose a date that will be your archiving cutoff or split point. Usually the last day of some month or quarter. Doesn't matter as long as you are consistent about it. The technical cutoff will be, in effect, 23:59:59 of the chosen date. The first record to be KEPT will be 00:00:00 of the next day in sequence.

Query #1 - Compute stock on hand as of your cutoff date. Create a single stock-on-hand transaction with the cutoff date. Put it in a temporary table until you need it. This will be a two-layer query. I.e. a query of a query.

Query #1A - a summation query grouped by item number for all transactions earlier than the archiving date so you can get the "inventory of X at archiving date"

Query #1B - an append query that draws from the summation query and feeds it to the temp table. The stock-on-hand record will have the archiving date

.
I am able to get "inventory of X at archiving date" and append the results to a temporary table but I can't see how to append the "archiving Date" data itself to the same table as the "Archiving date" is entered via parameter prompt? Any ideas?

View 2 Replies View Related

Catch A Parameter Value

Oct 25, 2005

Hi!
When I run a querry I have a parametr querry like this:
Between[FirstDate] and [LastDate]

I want to "catch" the FirstDate and LastDate from the parameter querry and place them in the head of the Report based on the same querry.
How do I do this????

View 1 Replies View Related

Pass A Parameter...

Aug 18, 2006

Hi there

When using parameters from one form to the next I normally hide the form and then reference the parameter textboxes in the next form to the hidden form. Is there a better way of doing this as I saw threads here mentioning passing a parameter. How do I do this? Thanks!

Dave

View 3 Replies View Related

Parameter Control With VBA

Aug 23, 2006

How can you control SQL statement parameters with VBA? The SQL statement will not accept a variable.:confused:

View 1 Replies View Related







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