I am tired, as I have done this or similar things many times, I am not seeing the problem here.
I will run a query producing the following SQL -
-
SELECT tblInterviewRecord.FaceToFaceReasonID, tblInterviewRecord.InterviewtypeID, tblInterviewRecord.ContactDate, tblEmployees.Initials, tblInterviewRecord.ServiceTypeID, tblFaceToFaceReason.FaceToFaceReason
-
FROM tblEmployees INNER JOIN (tblInterviewRecord INNER JOIN tblFaceToFaceReason ON tblInterviewRecord.FaceToFaceReasonID = tblFaceToFaceReason.FaceToFaceReasonID) ON tblEmployees.EmployeeID = tblInterviewRecord.EnteredBy
-
WHERE (((tblInterviewRecord.InterviewtypeID)=2) AND ((tblInterviewRecord.ContactDate)>=[Forms]![frmProductivity]![txtStartDate] And (tblInterviewRecord.ContactDate)<=[Forms]![frmProductivity]![txtEndDate]) AND ((tblEmployees.Initials)=[Forms]![frmProductivity]![cboInitials])) OR (((tblInterviewRecord.FaceToFaceReasonID)=3) AND ((tblInterviewRecord.InterviewtypeID)=1) AND ((tblInterviewRecord.ContactDate)>=[Forms]![frmProductivity]![txtStartDate] And (tblInterviewRecord.ContactDate)<=[Forms]![frmProductivity]![txtEndDate]) AND ((tblEmployees.Initials)=[Forms]![frmProductivity]![cboInitials]));
-
And the code of the button to run the Query is this: - Private Sub cmdRunQuery_Click()
-
On Error GoTo Err_cmdRunQuery_Click
-
-
Dim stDocName As String
-
stDocName = "qryProductivity2Query"
-
-
DoCmd.OpenQuery stDocName
-
-
Exit_cmdRunQuery_Click:
-
Exit Sub
-
-
Err_cmdRunQuery_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdRunQuery_Click
-
-
End Sub
-
I have seen the term dialog form, but not sure what is meant. Should I construct it differently than any other form, ie I used the employee table as base for form, but really dont need a base, just assumed I needed something.
I ran the query with manual input and it runs fine and returns correct data, which means it is something not connecting with the input to the form.
thanks for any help
Ken
3 1606
I am tired, as I have done this or similar things many times, I am not seeing the problem here.
I will run a query producing the following SQL
(CODE)
SELECT tblInterviewRec ord.FaceToFaceR easonID, tblInterviewRec ord.Interviewty peID, tblInterviewRec ord.ContactDate , tblEmployees.In itials, tblInterviewRec ord.ServiceType ID, tblFaceToFaceRe ason.FaceToFace Reason
FROM tblEmployees INNER JOIN (tblInterviewRe cord INNER JOIN tblFaceToFaceRe ason ON tblInterviewRec ord.FaceToFaceR easonID = tblFaceToFaceRe ason.FaceToFace ReasonID) ON tblEmployees.Em ployeeID = tblInterviewRec ord.EnteredBy
WHERE (((tblInterview Record.Intervie wtypeID)=2) AND ((tblInterviewR ecord.ContactDa te)>=[Forms]![frmProductivity]![txtStartDate] And (tblInterviewRe cord.ContactDat e)<=[Forms]![frmProductivity]![txtEndDate]) AND ((tblEmployees. Initials)=[Forms]![frmProductivity]![cboInitials])) OR (((tblInterview Record.FaceToFa ceReasonID)=3) AND ((tblInterviewR ecord.Interview typeID)=1) AND ((tblInterviewR ecord.ContactDa te)>=[Forms]![frmProductivity]![txtStartDate] And (tblInterviewRe cord.ContactDat e)<=[Forms]![frmProductivity]![txtEndDate]) AND ((tblEmployees. Initials)=[Forms]![frmProductivity]![cboInitials]));
(/CODE)
And the code of the button to run the Query is this:
(CODE)
Private Sub cmdRunQuery_Cli ck()
On Error GoTo Err_cmdRunQuery _Click
Dim stDocName As String
stDocName = "qryProductivit y2Query"
DoCmd.OpenQuery stDocName
Exit_cmdRunQuer y_Click:
Exit Sub
Err_cmdRunQuery _Click:
MsgBox Err.Description
Resume Exit_cmdRunQuer y_Click
End Sub
(/CODE)
I have seen the term dialog form, but not sure what is meant. Should I construct it differently than any other form, ie I used the employee table as base for form, but really dont need a base, just assumed I needed something.
I ran the query with manual input and it runs fine and returns correct data, which means it is something not connecting with the input to the form.
thanks for any help
Ken
A dialog form is just that, a form that "carries on a dialog with the user" in the form of prompts that require responses from the user.
In regards to your query, you did not speifically state what happens when the code runs, And when you say it runs correctly with manual input.....are you getting prompted to enter something? What happens exactly?
This portion of your select list in your SQL statement looks incorrect:
tblFaceToFaceRe ason.FaceToFace Reason <<<<<should that be
tblFaceToFaceRe ason.FaceToFace ReasonID <<<<<this
A dialog form is just that, a form that "carries on a dialog with the user" in the form of prompts that require responses from the user.
In regards to your query, you did not speifically state what happens when the code runs, And when you say it runs correctly with manual input.....are you getting prompted to enter something? What happens exactly?
This portion of your select list in your SQL statement looks incorrect:
tblFaceToFaceRe ason.FaceToFace Reason <<<<<should that be
tblFaceToFaceRe ason.FaceToFace ReasonID <<<<<this
Thanks for reading thru this, I know it looks conflomerated.
When I just open the query, it asks for both dates and the initials, even though I have the form open, with the info in the cbo and txt boxes. Again I havee numerous applications and places where I have parameter input, from forms and I have no issues, but for some reason, it is ignoring this form.
I of course have triple checked the names of the cbo and txt boxes, names of the query, names of the forms, and yet it is not working.
I appreciated you looking at it, I know without the entire app section it would be tough to figure out. I will work more and rephrase my question if I don't figure it out. Thank you so much. Ken
Thanks for reading thru this, I know it looks conflomerated.
When I just open the query, it asks for both dates and the initials, even though I have the form open, with the info in the cbo and txt boxes. Again I havee numerous applications and places where I have parameter input, from forms and I have no issues, but for some reason, it is ignoring this form.
I of course have triple checked the names of the cbo and txt boxes, names of the query, names of the forms, and yet it is not working.
I appreciated you looking at it, I know without the entire app section it would be tough to figure out. I will work more and rephrase my question if I don't figure it out. Thank you so much. Ken
There is one thing you can do.....declare your parameters. To do that, place your query in design view, then go to the command menu and select query>parameter s, then supply the name and data type of your parameters. Sometimes Access needs this info because it can't or won't pick a data type for your parameters.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Google Mike |
last post by:
After a lot of thought and research, and playing with FreeTDS and
InlineTDS, as well as various ODBC connections, I have determined that
the fastest and cheapest way to get up and going with PHP on Linux,
connecting to MS SQL Server, unless it was already pre-installed by
your Linux installation, is to build your own multithreaded TCP socket
server on Windows and connect to it through the socket API in PHP on
Linux (if you have installed...
|
by: MBS |
last post by:
Yeah, read the previous posts...I did that. None answer my question.
I just installed PHP 5.0.4, Apache 2.0.54, and MySQL 4.1.13 a few days ago
on WinXP SP2. My goal is to learn to use these programs.
I cannot, absolutely cannot connect to MySQL using PHP. I've tried
everything possible including the mysqli functions.
I have no idea what is wrong. I don't get any error messages at all. It's
almost as if PHP stops processing the...
|
by: Richard Hollenbeck |
last post by:
For example, one college course has only 24 students in it, but the
following code says there are zero As, 20 Bs, 16 Cs, 4 Ds, and 8 Fs. When
it prints it then says 0 As, 40 Bs, 32 Cs, 8 Ds, and 16 Fs. The actual
number it should show is zero As, 10 Bs, 8 Cs, 2 Ds, and 4 Fs. I can't find
anything wrong with the code. Here it is:
Option Compare Database
Option Explicit
'global variables
|
by: Patrick |
last post by:
I have an ASP.NET application that connects to a SQL Server database.
The SQL Server resides on a seperate development server from the IIS5.1 on
Windows XP SP2 on development PCs which host the ASP.NET application.
I would like to use Integrated Windows Authentication like
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=DBName;Data Source=DevServer1
My problems!
|
by: tshad |
last post by:
I can connect to my to my database in Sql Query (using "web" and "SA"), but
I can't get it to work in ADO.NET. I tried it from Dreamweaver as well as
from an ASP.NET page with this string:
Persist Security Info=False;Data Source=JODI;Initial Catalog=openworx;User
ID=web;Password=web;Network Library =dbmssocn
This string works on my other machine fine.
But here I am getting an Unauthorized error (401). I even get it with the
| |
by: Joe |
last post by:
I'm connecting to an Oracle database and running a query which returns
data. The query can be fairly long - 2-3 minutes. I have a label set
up on the form which is invisible to begin with. I want to make it
visible (with it's message) when the user clicks a button to run the
query. The label informs the user that the system is getting the data.
My code to do this is:
Private Sub btnRun_Click(ByVal sender As System.Object, ByVal e...
|
by: olafbrungot |
last post by:
I get the following error message when trying to connect to a host
database (OBCD connection) with "MS Query".
SQL0471N Invocation of routine "SYSIBM .SQLTABLES " failed due to
reason "00E7900C".
SQLSTATE=55023
I've found that this is a error with running the stored procedure
SQLTABLES, but I don't understand why?
|
by: jonniethecodeprince |
last post by:
Greetings all.
I have a problem with PERL and SQL Server.
I need to upload a database query to a web page using PERL and SQL Server. I have tried to do this myself but nothing displays on the page. The .CGI file will call the PERL but does not display any of the results of the query search via SQL Server on my page. I have commented out the output I wanted because this causes an Internal Server Error.
I realise that this is a very basic...
|
by: BigZero |
last post by:
hello i m new to php
i m working on project that has interface with simple html and php i m
thinking to use
i got some problem with the connecting to DB here is the code for
connecting db
$db = "Snmp_Dba";
// $connection_id = odbc_connect_custom($db);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |