A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

subform question



 
 
Thread Tools Display Modes
  #1  
Old February 11th, 2010, 05:52 PM posted to microsoft.public.access.gettingstarted
Bre-x
external usenet poster
 
Posts: 103
Default subform question

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


  #2  
Old February 11th, 2010, 06:55 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default subform question

On Thu, 11 Feb 2010 10:52:46 -0700, "Bre-x" wrote:

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

John W. Vinson [MVP]
  #3  
Old February 11th, 2010, 07:24 PM posted to microsoft.public.access.gettingstarted
Bre-x
external usenet poster
 
Posts: 103
Default subform question

Thank you for answering my question.

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

Thank You!!!!!








"John W. Vinson" wrote in message
...
On Thu, 11 Feb 2010 10:52:46 -0700, "Bre-x" wrote:

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()


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

John W. Vinson [MVP]



  #4  
Old February 11th, 2010, 08:34 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default subform question

On Thu, 11 Feb 2010 12:24:33 -0700, "Bre-x" wrote:

Thank you for answering my question.


I didn't think I had... but glad that your asking it got you in the right
direction!

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.