By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,509 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

Getting data from a subform and using it in the main form

xpun
P: 39
hey everyone

I was wondering if it was possible to get data form a subform and use it in a conditional in the main form

this is what Iíve got so far bu it doesnít really do anything

Expand|Select|Wrap|Line Numbers
  1. If Forms!Transactions.Query1subform.Form!feild.Billingcode = 1 Then ...
any help would be greatly appreciated.
May 12 '07 #1
Share this Question
Share on Google+
2 Replies


JConsulting
Expert 100+
P: 603
hey everyone

I was wondering if it was possible to get data form a subform and use it in a conditional in the main form

this is what Iíve got so far bu it doesnít really do anything

Expand|Select|Wrap|Line Numbers
  1. If Forms!Transactions.Query1subform.Form!feild.Billingcode = 1 Then ...
any help would be greatly appreciated.
That creates a circular condition don't you think?

What then happens to the records in the subform?

It can be done...but just because it can, doesn't mean it should.

Do you have some kind of button or event you wish to use to kick the code off?

if you're running this from the main form
Expand|Select|Wrap|Line Numbers
  1. if me.mysubform.form.billingcode = 1 then
  2. me.filter = "somefield=somevalue"
  3. me.filteron = true
  4. end if
  5.  
J
May 12 '07 #2

xpun
P: 39
That creates a circular condition don't you think?

What then happens to the records in the subform?

It can be done...but just because it can, doesn't mean it should.

Do you have some kind of button or event you wish to use to kick the code off?

if you're running this from the main form
Expand|Select|Wrap|Line Numbers
  1. if me.mysubform.form.billingcode = 1 then
  2. me.filter = "somefield=somevalue"
  3. me.filteron = true
  4. end if
  5.  
J
yes this bit of code would only run once when a member has 8 transactions. the idea was to make it part of a print routine , if a members billing code is one print one report if its 2 print the other
May 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.