Hello, i need you help, can someone whats the cause of getting an error of Expected function or variable, its like this i have a function code in a module and call it on my main form.. here my code: -
Function DTR7()
-
-
Dim rs As New ADODB.Recordset
-
Dim cnn As New ADODB.Connection
-
Dim x As Integer
-
-
frmMain.Command2.Visible = True
-
frmMain.Command1.Visible = False
-
frmMain.cboCourse.Enabled = False
-
frmMain.cboSemester.Enabled = False
-
frmMain.cboYear.Enabled = False
-
-
'Enabling Time,Room & Days Option
-
For x = 0 To 6
-
frmMain.Combo1(x).Enabled = True
-
frmMain.Combo2(x).Enabled = True
-
frmMain.Combo3(x).Enabled = True
-
Next
-
'Enabling Time,Room & Days Option
-
-
'Time Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [Time]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo1(x).AddItem rs.Fields("Time").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Time Connection
-
-
'Room Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [ROOMS]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo2(x).AddItem rs.Fields("ROOM").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Room Connection
-
-
'Days Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [DAYS]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo3(x).AddItem rs.Fields("DAYS").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Days Connection
-
End Function
-
the highlited part when i debug it is on the word "Function DRT7 ()"
what seems to be a problem here,hope somebody can help me with this. thank you very much...
1 9005 Dököll 2,364
Recognized Expert Top Contributor
Hello, i need you help, can someone whats the cause of getting an error of Expected function or variable, its like this i have a function code in a module and call it on my main form.. here my code: -
Function DTR7()
-
-
Dim rs As New ADODB.Recordset
-
Dim cnn As New ADODB.Connection
-
Dim x As Integer
-
-
frmMain.Command2.Visible = True
-
frmMain.Command1.Visible = False
-
frmMain.cboCourse.Enabled = False
-
frmMain.cboSemester.Enabled = False
-
frmMain.cboYear.Enabled = False
-
-
'Enabling Time,Room & Days Option
-
For x = 0 To 6
-
frmMain.Combo1(x).Enabled = True
-
frmMain.Combo2(x).Enabled = True
-
frmMain.Combo3(x).Enabled = True
-
Next
-
'Enabling Time,Room & Days Option
-
-
'Time Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [Time]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo1(x).AddItem rs.Fields("Time").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Time Connection
-
-
'Room Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [ROOMS]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo2(x).AddItem rs.Fields("ROOM").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Room Connection
-
-
'Days Connection
-
If rs.State = adStateOpen Then rs.Close
-
rs.Open "Select * from [DAYS]", cnn, adOpenKeyset, adLockOptimistic
-
While rs.EOF <> True
-
For x = 0 To 6
-
frmMain.Combo3(x).AddItem rs.Fields("DAYS").Value
-
Next x
-
rs.MoveNext
-
Wend
-
'Days Connection
-
End Function
-
the highlited part when i debug it is on the word "Function DRT7 ()"
what seems to be a problem here,hope somebody can help me with this. thank you very much...
In a previous post with this code, I meant to mention you have ROOMS and ROOM, perhaps that's where the problem is: -
-
frmMain.Combo2(x).AddItem rs.Fields("ROOM").Value
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Karol Szkudlarek |
last post by:
Hello C++ fans!
Why the following program does not compile on my box:
typedef int my_int;
class A
{
public:
|
by: cranium.2003 |
last post by:
hi,
Here is my code
#include <iostream.h>
int main()
{
cout <<"HI";
return 0;
}
and using following command to compile a C++ program
g++ ex1.cpp -o ex1
|
by: mastermagrath |
last post by:
Hi,
I'm about half way through Bruce Eckels thinking in C++ Vol 1. He gives
a very short example of how compiler function name decoration helps
remove subtle bugs by type-safe linkage. However, upon looking at the
example i understand why it fails to link but don't understand why it
even compiles. Here's the code, which split between 2 files Def.cpp and
Use.cpp:
//File Def.cpp
|
by: Eric Lilja |
last post by:
Is this an invalid program? Doesn't compile on my system:
#include <cstdio>
class Why
{
enum TArch {LITTLE_ENDIAN, BIG_ENDIAN, NON_IEEE};
TArch Architecture;
};
int
|
by: AkiMatti |
last post by:
Hi!
I'm using MS Access 2002 and have troubles calling my function in a module I've created. When I try to even write the call of the function, it instantly gives me an error saying: "Compile Error Expected: (" eventhough I have the '(' in there. Sometimes it expects a '=' symbol instead, wanting me to bind the call to some variable I guess. What should I do? The function I'm calling does not return any parameters.
Here is my code:
...
| |
by: wong_powah |
last post by:
#include <vector>
#include <iostream>
using std::cout;
using std::vector;
enum {DATASIZE = 20};
typedef unsigned char data_t;
|
by: akhilesh.noida |
last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting
errors while configuring it. Please check and give your inputs for
resolving this.
configure command :
$ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/
install/ --with-__thread
--enable-kernel=2.6.11 --enable-shared
|
by: Hill |
last post by:
This is an simple map, just an exercise. Who can help me fix this
compile issue?Thanks in advance.
#include <string>
#include <vector>
#include <iostream>
using std::vector;
using std::string;
using std::cout;
using std::endl;
|
by: ppletkov |
last post by:
Hi -
I apologize if this is a simple question in advance :-) (hopefully it is so its quickly resolved!)
i'm trying to figure out why i keep getting an error (Compile Error : expected function or variable) for my .find method. I have checked the format of this statement and it appears correct...?
Dim ItemNumberWLO As String
Dim ItemNumberWLN As String
While Not WLO.EOF
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: 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...
| |