Error on “on current event” Split Form.

Petros

Registered User.
Local time
Today, 10:16
Joined
Jun 30, 2010
Messages
145
Hi all, i start to discover the advantages of the Split Form, and at the same time its difficult to find relevant information to errors in relation to this set up.
“The expression On Current you entered as the event property setting produced the following error: Return without GoSub”..
For an ignorant amateur like myself this message represents a major” meltdown” J

What to do?

Thanks!
 
What's the code that you are running in the On Current event?

Additionally I not entirely sure I understand what you mean by a "Split Form" :confused:
 
What's the code that you are running in the On Current event?

Additionally I not entirely sure I understand what you mean by a "Split Form" :confused:


Access 2007 new form feature..Split Form..

Code

Private Sub Form_Current()
Alert = DLookup("[Alert]", "AlertTypeEx", _
"[AlertType]='" & AlertType.Value & "'")

AlertType.RowSource = "Select AlertTypeEx.AlertType " & _
"FROM AlertTypeEx " & _
"WHERE AlertTypeEx.Alert = '" & Alert.Value & "' " & _
"ORDER BY AlertTypeEx.AlertType;"
End Sub
 
Access 2007 new form feature..Split Form..

Code

Private Sub Form_Current()
Alert = DLookup("[Alert]", "AlertTypeEx", _
"[AlertType]='" & AlertType.Value & "'")

AlertType.RowSource = "Select AlertTypeEx.AlertType " & _
"FROM AlertTypeEx " & _
"WHERE AlertTypeEx.Alert = '" & Alert.Value & "' " & _
"ORDER BY AlertTypeEx.AlertType;"
End Sub

Make sure you refer to the form as well when you refer to your controls:
Code:
Private Sub Form_Current()
 
   [COLOR=red][B]Me.[/B][/COLOR]Alert = DLookup("[Alert]", "AlertTypeEx", _
"[AlertType]='" & [B][COLOR=#ff0000]Me.[/COLOR][/B]AlertType.Value & "'")
 
[COLOR=red][B] Me.[/B][/COLOR]AlertType.RowSource = "Select AlertTypeEx.AlertType " & _
      "FROM AlertTypeEx " & _
      "WHERE AlertTypeEx.Alert = '" & [B][COLOR=red]Me.[/COLOR][/B]Alert.Value & "' " & _
      "ORDER BY AlertTypeEx.AlertType;"
 
End Sub
 
Make sure you refer to the form as well when you refer to your controls:
Code:
Private Sub Form_Current()
 
   [COLOR=red][B]Me.[/B][/COLOR]Alert = DLookup("[Alert]", "AlertTypeEx", _
"[AlertType]='" & [B][COLOR=#ff0000]Me.[/COLOR][/B]AlertType.Value & "'")
 
[COLOR=red][B]Me.[/B][/COLOR]AlertType.RowSource = "Select AlertTypeEx.AlertType " & _
      "FROM AlertTypeEx " & _
      "WHERE AlertTypeEx.Alert = '" & [B][COLOR=red]Me.[/COLOR][/B]Alert.Value & "' " & _
      "ORDER BY AlertTypeEx.AlertType;"
 
End Sub


:-) the code runs well in sinlge form format..now i understand it better.

Mr bobLarsson, i feel much obliged...thanks!
 

Users who are viewing this thread

Back
Top Bottom