473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

help with runtime error

2
I keep getitng this 2001 - You canceled the previous operation.
Some one please help me.
Here is the code.

Option Compare Database
Option Explicit

Private Sub cboColumnField_AfterUpdate()

Dim strSQL As String
Dim strSQLSF As String

cboNumericField = Null

strSQL = " SELECT DISTINCT tblDemo.NumericField FROM tblDemo "
strSQL = strSQL & " WHERE tblDemo.RowField = '" & cboRowField & "' And "
strSQL = strSQL & " tblDemo.ColumnField = '" & cboColumnField & "'"
strSQL = strSQL & " ORDER BY tblDemo.NumericField;"

cboNumericField.RowSource = strSQL

strSQLSF = " SELECT * FROM tblDemo "
strSQLSF = strSQLSF & " WHERE tblDemo.RowField = '" & cboRowField & "' And "
strSQLSF = strSQLSF & " tblDemo.ColumnField = '" & cboColumnField & "'"


Me!sfrmForm.LinkChildFields = ""
Me!sfrmForm.LinkMasterFields = ""

Me!sfrmForm.LinkChildFields = "RowField;ColumnField"
Me!sfrmForm.LinkMasterFields = "RowField;ColumnField"
Me.RecordSource = strSQLSF
Me.Requery

End Sub

Private Sub cboNumericField_AfterUpdate()

Dim strSQLSF As String

strSQLSF = " SELECT * FROM tblDemo "
strSQLSF = strSQLSF & " WHERE tblDemo.RowField = '" & cboRowField & "' And "
strSQLSF = strSQLSF & " tblDemo.ColumnField = '" & cboColumnField & "' And "
strSQLSF = strSQLSF & " tblDemo.NumericField = " & cboNumericField

Me!sfrmForm.LinkChildFields = ""
Me!sfrmForm.LinkMasterFields = ""

Me!sfrmForm.LinkChildFields = "RowField;ColumnField;NumericField"
Me!sfrmForm.LinkMasterFields = "RowField;ColumnField;NumericField"
Me.RecordSource = strSQLSF
Me.Requery

End Sub

Private Sub cboRowField_AfterUpdate()

Dim strSQL As String
Dim strSQLSF As String

cboColumnField = Null
cboNumericField = Null

strSQL = "SELECT DISTINCT tblDemo.ColumnField FROM tblDemo "
strSQL = strSQL & " WHERE tblDemo.RowField = '" & cboRowField & "'"
strSQL = strSQL & " ORDER BY tblDemo.ColumnField;"

cboColumnField.RowSource = strSQL

strSQLSF = "SELECT * FROM tblDemo "
strSQLSF = strSQLSF & " WHERE tblDemo.RowField = '" & cboRowField & "'"

Me!sfrmForm.LinkChildFields = "RowField"
Me!sfrmForm.LinkMasterFields = "RowField"
Me.RecordSource = strSQLSF
Me.Requery

End Sub

Private Sub cmdShowAll_Click()
On Error GoTo err_cmdShowAll_Click

cboRowField = Null
cboColumnField = Null
cboNumericField = Null
Me!sfrmForm.LinkChildFields = ""
Me!sfrmForm.LinkMasterFields = ""
Me.RecordSource = "tblDemo"
Me.Requery

exit_cmdShowAll_Click:
Exit Sub

err_cmdShowAll_Click:
MsgBox Err.Description
Resume exit_cmdShowAll_Click

End Sub

Private Sub Form_Open(Cancel As Integer)

Dim strSQL As String

strSQL = " SELECT DISTINCT tblDemo.RowField FROM tblDemo ORDER BY tblDemo.RowField;"
cboRowField.RowSource = strSQL

End Sub
May 11 '10 #1
0 794

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Peter | last post by:
I have a program which was working fine. In it a function works out the number of .jpg files in a specified folder. I then realised that I needed to make sure the folder exists first & added the...
5
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived...
4
by: VB Programmer | last post by:
If I try ANY aspx pages on my server, even INVALID, bogus pages, I get a "Runtime Error". Any idea why? Here is the full message: Server Error in '/' Application....
12
by: Kevin Farless | last post by:
Hi all, I'm having trouble viewing any .aspx pages on my hosting company's server. The server is a new box running Windows Server 2003 default installation. I'm the first client to try using...
2
by: Massimo Soricetti | last post by:
Hello, I'm trying to fix this little class: <code> #include <ifstream> #include <iostream> #include <iomanip> using namespace std;
0
by: Terry Tang | last post by:
Hi There, We are extending Python interpreter to support special functions of our tools. What we did is to compile Python's source code (which is got from the an installation on a Linux...
4
by: news.citenet.net | last post by:
I keep getting the following error message after my web site running 2 or 3 days I share one folder with about 200 domain names Any one can help? ...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
3
by: enough2Bdangerous | last post by:
access runtime error 3011 on docmd.openreport -------------------------------------------------------------------------------- Access database (file format 2002-2003) generates reports with...
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.