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:
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...
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
what seems to be a problem here,hope somebody can help me with this. thank you very much...
Comment