Query Only Works Through Clicking On Icon

Oct 1, 2007

i posted about this the other day, thought i sorted it and now it keeps coming back to haunt me

i have an append query in my database it is based on 3 other queries

when the query is run using vb

DBEngine(0)(0).Execute "QRY_ImportDuplicatesTopLevel", dbFailOnError

or by putting its sql into a string and executing using CurrentProject.Connection.Execute strSQL

i get an error message saying too few paramters - expected one

i'm fairly used to these messages which mean that in the query is a non existent or misspelt field and i find them by running the query in the query viewer and letting access highlight the missing / misspelt field

the weird part is that when i run this query as a stored object by clicking on its icon i get no error and the query does the job it is supposed to do

does anyonw have any idea why this situation could occur?

View Replies


ADVERTISEMENT

Subquery Works Alone, But Not With Query.

Oct 4, 2006

Hi,

I have written a subquery that works fine alone, but it returns -1 when with query.

The subquery is supposed to return a total of type currency.

Any help/suggestions will be very much appreciated.

SELECT tblSite.Name, tblPhase.Phase_No, tblVariation_Order.Customer_No, Exists (SELECT Sum(tblVariation_Order.VO_Price)
FROM tblCustomer INNER JOIN tblVariation_Order ON tblCustomer.Customer_No=tblVariation_Order.Custome r_No
GROUP BY tblCustomer.Customer_No;) AS Expr1
FROM (tblCustomer INNER JOIN tblVariation_Order ON tblCustomer.Customer_No = tblVariation_Order.Customer_No) INNER JOIN (tblSite INNER JOIN (tblPhase INNER JOIN tblHouse ON tblPhase.Phase_No = tblHouse.Phase_No) ON tblSite.Site_No = tblPhase.Site_No) ON tblCustomer.Customer_No = tblHouse.Customer_No
WHERE (((Exists (SELECT Sum(tblVariation_Order.VO_Price)
FROM tblCustomer INNER JOIN tblVariation_Order ON tblCustomer.Customer_No=tblVariation_Order.Custome r_No
GROUP BY tblCustomer.Customer_No;))=True));

View 5 Replies View Related

Query Works But With Errors?

Jun 25, 2007

I've got a number of different append and delete queries running on command on one of my forms, in which it makes a copy of all of the data on that form and included subforms, copies them into another table, and then deletes all of the data from that record. When this runs, I get an error saying "record deleted" and then another error message. Now it is deleting the records and it is moving them, however when i go onto one of the subforms, all the fields in the subform show "Deleted#" until i go back to the previous record or forward to the next, then they clear, but everytime it brings up the other error message it says "end or Debug" which I don't want it doing.

Is this the query? Or the coding?

Thanks

View 7 Replies View Related

Double Clicking Query List Box Results

Oct 18, 2006

Hi,

Does anyone know how I can set up the following?

I have a form with a list box in it which is populated by the data from a query.
What I would like is that when a user clicks on one line of data so that the line goes black and the text goes white, I would like the code that when double clicked, will take you to a form with the record displaying the same data as the one that was in the list box.

E.g. The list box would be a work queue of outstanding post items to action and when a record is double clicked on, it takes you to another form but shows all of the data for that record as opposed to just the data in the list box query result.

Many thanks

View 2 Replies View Related

Queries :: Less Than Parameter In Query Works Except When Value Is 100

Jun 27, 2014

I have a query that checks a table where there's a field that only has numbers from 0 to 100 (a grade), let's call that field "average" (note, the values 0 to 100 are actual numeric values, not percentages)

here's the problem:

when I filter the query using a parameter like <[value] on the average field, the query does show the expected records that have an average value that is less than the value that I input when prompted... except that it also includes the records on which the average field is 100 ... ... for some uknown reason.

to clarify:it won't show anything over the imput value, it just shows anything under the value I imput (good) and anything that has an average of 100

when I hard code the value for the parameter say <65 the query gives me the results expected (anything less than 65 in the average field) without including records with average equal to 100

some details:

the average field has this code: Average: CInt(Nz([Grade]))

the query looks like this:

SELECT [All Classes P1 Query].Class, [All Classes P1 Query].[Student ID], [All Classes P1 Query].[Full Name], [All Classes P1 Query].Subject, CInt(Nz([Grade])) AS Average, [All Classes P1 Query].Qualification, [All Classes P1 Query].[Student - Class - Grade].[Class Grading Period]
FROM [All Classes P1 Query]
GROUP BY [All Classes P1 Query].Class, [All Classes P1 Query].[Student ID], [All Classes P1 Query].[Full Name], [All Classes P1 Query].Subject, CInt(Nz([Grade])), [All Classes P1 Query].Qualification, [All Classes P1 Query].[Student - Class - Grade].[Class Grading Period]
HAVING (((CInt(Nz([Grade])))<[value]));

I'm on access 2007

View 4 Replies View Related

Query Works But Not With Command Button?

Oct 19, 2011

I have a query: qryNoSurgery with linked tables tblSurgery(many) to tblPatients(one) where tblSurgery!SurgeryDate criteria = Is Null. When I run the query by itself, it works perfectly. I get all the tblPatients data where SurgeryDate field is null.

I created a command button that opens a form, frmPatients, If I enter qryNoSurgery as the filter argument in the embedded macro and run it, I get a Msgbox which wants me to enter a parameter for qryNoSurgery!SugergyDate.

View 8 Replies View Related

Query Works But Same Where Condition Does Not With OpenForm

Aug 23, 2013

I am creating a search function to search a name. The DB stores it as [First Name] , [Last Name].... This query works

Code:
SELECT *
FROM tblVolunteers
WHERE ((([First Name] & " " & [Last Name]) Like "*bob j*"));

It will show me records for Bob Johnson, Bob James and Bob Jones....

I am trying to duplicate this with a DoCmd.OpenForm statement... Replacing the static name with a field variable...

Code:
Dim whereClause As String
whereClause = "[First Name]" & " " & "[Last Name] Like " '*" & volunteerName & "'*""
DoCmd.OpenForm "Volunteers", acNormal, , whereClause, , , False

View 4 Replies View Related

ORDER BY Clause Works In Query But Not In Report?

Nov 7, 2012

I have a Report that uses a query as it's record source. I have the query ordered by a field, which works as expected in the table view of the query. In the report, however, the ORDER BY clause does not seem to carry through. The field is not sorted Ascending. What's going on?

View 5 Replies View Related

Queries :: ODBC Call Failed On Query But Form Works

Aug 7, 2013

When running a query in Access 2013 or 2010 we get an ODBC call failed. However when we run just the form, which the query connects to, it works just fine.

View 3 Replies View Related

Update A Form Field By Double Clicking A Query Field

Apr 25, 2013

I have 3 peices of data that I am working with: Group number, plans and benefit elections. On my form I have fields for the group number and plan and 2 queries. When I enter a group number the first query displays a list of plan descriptions for that group. From there I can enter the plan description into the form's plan field and that runs the second query to give me a list of valid elections for that plan. This all works fine but I want to make the plan selection a little less tedious. What I would like is to be able to double click the query field housing the plan description and have it copied to the form's plan field. I could use the ID instead of the plan description but I work in a production environment and very key stroke counts so I would really like to have a simple double click process.

Is this even possible? If so how would I set that up? I tried using the double click on event macro builder but it does not seem to have this kind of option.

My form contains fields for group number and Plan. The same form houses 2 querys, one that pulls plans based on the group number and the other to pull elections based on the plan field (not the plan query). Would like to double click a plan within the plan query and have that description populated into the form's plan field.

View 6 Replies View Related

Icon Most Wanted

Jan 25, 2006

Hello fellow users,

Just a quick note, i would like to know if anybody has come across any good internet site for download of icons ideally free ones.

Alastair

View 4 Replies View Related

Office XP Icon Dll

Apr 5, 2006

Hello Folks, i was wondering whether any one knows any dll or file that stores office xp icons. I wanna extract them.

View 2 Replies View Related

Changing Icon For Mde!

Apr 24, 2006

hello guys,

firstly thanks to all the guys here without whose help, I would not have been able to finish my database. However, there remains one question to which I havent found a satisfactory answer. I have checked through all the threads here.

I have made an .mde for my application and I want to customize my application icon to my company icon. The DB by default shows the access icon which I would like to change.

The threads here deal with issues of changing the desktop shortcut icon or changing the icon for forms. These threads do not address the problem I am facing.

I want the icon to be changed from access icon to a customized icon.
I am using MS access 97.
Any help will be greatly appreciated. If there is a thread which I may have overlooked, plz point me out.
Thanks in advance
FXP.

View 5 Replies View Related

Icon Troubles

Aug 19, 2007

Hi, this is my first message on this forum ;)!
I have a little problem with my Access 2000 (with 2003 too on another compuer), in fact when I put an icon on a page of my Tab Control, the background of that icon is white and not transparent (the file I use is an "ico" file and so it HAS a transparent background, anyway I treid all the possible file types); the strange thing is that when I put an icon on a button, the icon is shown properly. Here is an image of my problem:

http://img529.imageshack.us/img529/9922/testuu9.jpg

Thank you,

StockBreak

View 10 Replies View Related

Can't Use The Toolbox Icon

Jan 24, 2006

I'm working on a user's database that needs some cleaning up; however, when I go into the "View" menu, the option to use the Toolbar is greyed out and I therefore can't utilize the Toolbar.

What do I have to do in order to have use of the Toolbar?

Thanks in advance.

View 2 Replies View Related

Icon Ghosting

Nov 13, 2006

when a toggle button object is selected on a form, it becomes ghosted. What property is changed? I want to reset all the other toggle button images when a new one is selected.

View 1 Replies View Related

Is It Possible To Do A Systray Icon?

Oct 10, 2007

I trying to find out if it is possible to have a systray icon load when you start a access database or form? This way I could do pop up messages and icon changes thru out running access. Any advice, links, or imput would be great. Thanks !

View 1 Replies View Related

Modifying An Icon's Properties

Mar 21, 2006

I have an Access database split into FE/BE. For the front end, each user has his own directory on the lan. The directory is named with the UserName.

I've created an installation program in Access. It basically installs the icon on the user's desktop using Environ("UserName"). It also installs an Excel file the program needs on the hard drive.

Here's the problem...Right now, the installation program grabs the shortcut off the lan and installs it, but that shortcut has one user's UserName hard coded as the target. That one piece of information needs to change for each person. Is there a way for the program to modify the target based on the username of the person running the installation program? Without this piece, I need to visit every user after he runs the installation program and modify the properties of the new icon to point to his specific directory.

Thanks for any help you can provide!!

View 2 Replies View Related

When Specifiying An Application Icon...

May 11, 2006

I can't hide the database window...but when I take out the application icon, I can hide the database window.

Why can't I do both at the same time?:confused:

View 2 Replies View Related

Wrong Access Icon

Dec 10, 2006

hi all,
this morning i installed the ms access 2000 runtime and then i uninstalled it.
After that i had some problems and there was no other choice than uninstall and install the office 97.
Now for some reason the access 97 works BUT the mdb files have a notepad icon instead the access 97 icon.
however, if i see the icon's properties under OPEN WITH the icon is the correct one.

can u hlp me?
thx in advance, 4 your time, max.

View 2 Replies View Related

Access And Clipboard Icon

Jun 24, 2007

Hi
i would like to add an icon clip board to the database i created.
how do i do that??
thanks in advance for your help

View 1 Replies View Related

Icon As DEFAULT, When Embedding PDF's

Dec 12, 2007

In an attempt to keep the aged and wise users of the DB from overlooking the "display as Icon" cbo when embedding PDF's, and thus finding them unaware of attached documents, I'm searching for a way to select this by default to eliminate the problem altogether.(leban's didn't seem to say anything helpful on the matter)

Any ideas, virtual-mentors?

View 3 Replies View Related

MS Access Developer Icon

Feb 3, 2008

Hi,
I have installed Access Developer Extensions and Access Runtime but still I can not see the "developer" option in menu. Can someone please help me to find this option.

SF

View 1 Replies View Related

Shortcut Icon Lost Its Way....

Mar 7, 2008

A problem I have seen a couple times has come up again... Wondering if anyone knows why this happens?
This is always with a split DB.... Using "Remote Access"..... The user signs on, a shortcut to the Frontend of the application is there...... But when clicked... nothing.
I personally did not load this one onto the clients server, but I believe the administrator has done this to use a bit of group security abilities. I think he has put the Frontend in their "Documents" folder and then puts a shortcut to the frontend on their remote desktop (Server)....... But time after time it loses the path to the frontend....or maybe doesn't recognize that it is an mdb file....Not sure. Anyone had this come up before??

View 6 Replies View Related

Remove Form Icon

Feb 9, 2006

I read some solutions to replacing a default Access icon for forms. However, I was wondering if there is a simple solutioin to removing them all together without causing an error?

View 1 Replies View Related

Referring To The Application Icon Using Code

Jan 2, 2008

Hello all...Happy New Year!!

I have obtained some VB code shown below which adds an icon to the windows task bar as I intend to put some additional code behind this that displays messages near the clock when something happens in the database.
The problem I have is that the code does add an icon but the icon is literally blank. i.e. it makes an additional icon space but does not display any picture.
The code is not actually for VBA so I need to tweak it. I am struggling with telling it which icon to display. Does anyone know how to refer to the application icon using code??

The code I am working on is: (there is also a module but I will post this if you need it.)
-------------------------------

Private Sub AddTrayIcon()

Dim nid As NOTIFYICONDATA

' nid.cdSize is always Len(nid)
nid.cbSize = Len(nid)
' Parent window - this is the window that will process the icon events
nid.hWnd = frmSystray.hWnd
' Icon identifier
nid.uID = 0
' We want to receive messages, show the icon and have a tooltip
nid.uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
' The message we will receive on an icon event
nid.uCallbackMessage = 1024
' The icon to display
nid.hIcon = frmSystray.Icon
' Our tooltip
nid.szTip = "Always terminate the tooltip with vbNullChar" & vbNullChar

' Add the icon to the System Tray
Shell_NotifyIconA NIM_ADD, nid

' Prevent further adding
cmdAddIcon.Enabled = False
End Sub

Private Sub cmdAddIcon_Click()
AddTrayIcon
End Sub

-------------------------


This is the code that is the problem. I dont think VBA has this function so I need to tell it where to find the .ico file I use for my database.
Thanks folks.

View 2 Replies View Related







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