subform question

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
 
J

John W. Vinson

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?
 
B

Bre-x

Thank you for answering my question.

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

Thank You!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top