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 8963
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,...
|
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...
|
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 :
$...
|
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;...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shćllîpôpď 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |