473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

xpun
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
2 1527
JConsulting
603 Expert 512MB
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
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

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

Similar topics

15
by: U N Me | last post by:
I have a continuous form that lists records from a query. One of the columns is an amount field, In the footer of the form I place a text box that displays the total (sum) of the amount. The...
15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
1
by: jbroome | last post by:
I have a main form which contains information for several subforms which I can link no problem but i also have some other information from another table which i wish to attach to the main form for...
8
by: J. Black | last post by:
Hello everyone - I've been developing an incident tracking and reporting system for an emergency services outfit that I work with part time. It's going well, except for one fly in the ointment....
1
by: Susan | last post by:
I have a bound form and subform and am trying to enter the data in both forms programatically. The Linkmaster and Linkchild properties are set. My intent is to be able to look at the data before it...
1
by: Donna Sabol | last post by:
I have a form (frm_MAIN_RPT) that contains a combo box (Combo6) & subform (dbo_REQ_subform). The combo box is used to select the "cost center" data that will be displayed in the subform. From...
1
by: kenduron | last post by:
Hello together! How would you manage the following termin: I got table "A" and table "B" I have to show most of the fields in "A", an one columm in table "B". But table "B" can have...
10
by: Ami | last post by:
Hello everyone, I have developed a small access application and now I need to lock my forms against unwanted edits. I have used the code by Allen Browne I found here...
3
by: bosmatthews | last post by:
I have a main form with a subform and a second subform nested to the first subform. The data entry property for all three forms (main, subform and sub-subform) is set to "yes" because I am intending...
1
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.