Sub Error

still_rookie

Registered User.
Local time
Today, 19:08
Joined
Apr 17, 2005
Messages
122
help..

This is my visual basic code for access... But there is somin wrong, it keeps giving me an error with the line in red...

Code:
Private Sub Command2_Click()
Frame0.Visible = True
Command15.Visible = True
End Sub

[COLOR=red]Private Sub Command15_Click()[/COLOR]
If Option3.Value = True Then
Accidents.Show
End If
If Option5.Value = True Then
Car Details.Show
End If
If Option7.Value = True Then
Employee Details.Show
End If
If Option9.Value = True Then
Fuel Details.Show
End If
If Option11.Value = True Then
Service.Show
End If
If Option13.Value = True Then
Transaction.Show
End If
End Sub
 
I don't think it's the line you've highlighted. Your forms have spaces in their names which you can't do. It's been a while since I used Visual Basic 6 so I can't rememer exactly but you may have to put an underscore in the form name in lieu of the space.

i.e.

Car_Details.Show

or, maybe it's square brackets

[Car Details].Show

Careful on the thread names, though. ;) My post on your "create users post" explains why. :) Also, I've moved this to Visual Basic as this has nothing to do with .NET
 
Last edited:
ye p ive removed all the spaces but now it gives me a different error....


Code:
Private Sub Command2_Click()
Frame0.Visible = True
Command15.Visible = True
End Sub

Private Sub Command15_Click()
[COLOR=Red]If Option3.Value = True Then[/COLOR]
frmAccidents.Show
End If
If Option5.Value = True Then
frmCar_Details.Show
End If
If Option7.Value = True Then
frmEmployee_Details.Show
End If
If Option9.Value = True Then
frmFuel_Details.Show
End If
If Option11.Value = True Then
frmService.Show
End If
If Option13.Value = True Then
frmTransaction.Show
End If
End Sub
 
Last edited:
umm .. this is wat it says when i use the option button and click on the command button :

Code:
RUN TIME ERROR '2427'
You entered an expression that has no value.

:(
 

Users who are viewing this thread

Back
Top Bottom