subform question

  • Thread starter Thread starter Bre-x
  • Start date Start date
B

Bre-x

I have a main form and a subform

Whe the subform is not showing any record I want to stop my code on the
main form


Private Sub Form_Current()
'Setup variables
var_folder = const_path & Me.fsearchsub!pmac & "\" & Me.fsearchsub!tcustid
var_path = var_folder & "\" & Me.fsearchsub!pmac & Me.fsearchsub!pprog
var_fn = "FN-" & Me.fsearchsub!tcustid & "/" & Me.fsearchsub!pmac &
Me.fsearchsub!pprog
var_prog = Me.fsearchsub!pprog
var_mac = Me.fsearchsub!pmac
End Sub
 
I have a main form and a subform

Whe the subform is not showing any record I want to stop my code on the
main form


Private Sub Form_Current()
'Setup variables
var_folder = const_path & Me.fsearchsub!pmac & "\" & Me.fsearchsub!tcustid
var_path = var_folder & "\" & Me.fsearchsub!pmac & Me.fsearchsub!pprog
var_fn = "FN-" & Me.fsearchsub!tcustid & "/" & Me.fsearchsub!pmac &
Me.fsearchsub!pprog
var_prog = Me.fsearchsub!pprog
var_mac = Me.fsearchsub!pmac
End Sub

ummm...

You're setting some variables. You're not doing anything with them, and not
telling us enough information that we could offer any advice on what to do
with them.

What's the Recordsource of the subform? What determines whether or not it has
records? What is its Master Link Field and Child Link Field?
 
Thank you for answering my question.

I move the code to the sub form, and that did the trick

Thank You!!!!!
 
Back
Top