473,569 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linking subforms by a specific value

I have a form that shows burglar alarm permits. I have a subform that
shows the alarms that have occurred at the location of the permit
(linked by permit number). There is a different fine schedule for false
alarms for burglar alarms vs. panic alarms. I thought I could just
create an alarm type field and add an additional subform so that
burglar alarms appear in the first subform, and panic alarms appear in
the second subform. I tried filtering the subforms by alarm type, but
I couldn't get the filter to save. I tried having the subforms based
on queries that separate the alarm types, but I had problems defaulting
the alarm types when adding new entries. I'm now thinking about
creating two separate alarm files, but then I'll have to update a bunch
of other stuff. What would be the best approach, and how can I get it
to work?

Nov 13 '05 #1
5 3055
You could use the Link Child Fields and Link Master Fields properties of the
subform to filter based on alarm type, and any other filter properties.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"kkrizl" <kk****@co.el-dorado.ca.us> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I have a form that shows burglar alarm permits. I have a subform that
shows the alarms that have occurred at the location of the permit
(linked by permit number). There is a different fine schedule for false
alarms for burglar alarms vs. panic alarms. I thought I could just
create an alarm type field and add an additional subform so that
burglar alarms appear in the first subform, and panic alarms appear in
the second subform. I tried filtering the subforms by alarm type, but
I couldn't get the filter to save. I tried having the subforms based
on queries that separate the alarm types, but I had problems defaulting
the alarm types when adding new entries. I'm now thinking about
creating two separate alarm files, but then I'll have to update a bunch
of other stuff. What would be the best approach, and how can I get it
to work?
Nov 13 '05 #2
The Link Child Fields and Link Master Fields properties of the
subform are set to the fields that link them already (permit number in
both tables). I know I can specify additional fields by separating
them with semicolins, but what is the syntax to specify a value for the
field to be filtered by?

Nov 13 '05 #3
"kkrizl" <kk****@co.el-dorado.ca.us> wrote in
news:11******** **************@ z14g2000cwz.goo glegroups.com:
I have a form that shows burglar alarm permits. I have a
subform that shows the alarms that have occurred at the
location of the permit (linked by permit number). There is a
different fine schedule for false alarms for burglar alarms
vs. panic alarms. I thought I could just create an alarm type
field and add an additional subform so that burglar alarms
appear in the first subform, and panic alarms appear in the
second subform. I tried filtering the subforms by alarm type,
but I couldn't get the filter to save.
Even if you had, you would have encountered the problem of what
you tried next.

I tried having the subforms based on queries that separate the alarm types, but I
had problems defaulting the alarm types when adding new
entries.
But you didn't set each subform's alarmtype.defau ltvalue.
I'm now thinking about creating two separate alarm
files, but then I'll have to update a bunch of other stuff.
This would not be a smart move. both for maintenance and what if
you add a third alarm type.
What would be the best approach, and how can I get it to work?


I can suggest two options:
1) create a new table, containing alarmtype.ID and
Alarmtype.descr iption. On the single subform, add a combobox for
the alarmtype, so that it's easy to identify and change
alarmtypeid.

2)On your mainform, add hidden textboxes, each containg the
value of one alarm type. Set the link child fields to
permitnumber;al armtype and the link parent fields to the
permitnumber;na meoftextbox containing the alarmtype value you
want in that subform.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #4
I used option 2, and it works great.
Thanks!

Nov 13 '05 #5
LinkMasterField s and LinkChildFields must match for the Record to display in
the Form embedded in the Subform Control. Those properties _are_ a kind of
filtering. They are not as flexible as a WHERE Clause.

Larry Linson
Microsoft Access MVP

"kkrizl" <kk****@co.el-dorado.ca.us> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
The Link Child Fields and Link Master Fields properties of the
subform are set to the fields that link them already (permit number in
both tables). I know I can specify additional fields by separating
them with semicolins, but what is the syntax to specify a value for the
field to be filtered by?

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4508
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked...
2
4673
by: Mike Boozer | last post by:
I have two subforms on my main form. I want the records on subform B to correspond with the records on subform A which they do. However, I want the records on subform A to let me know if there is a corresponding record on subform B without having to go to subform B to see for myself. Take a look at the screenshots of what I am trying to...
1
2800
by: santociabattari | last post by:
Hi Folks, I have 3 forms I want to link, so that when I advance 1 record in one form it will update the other two with the same record in the first form. I have tried using the form wizard (I am not an Access pro), but when I add the fields of 3 tables the wizard balks. I have been told to use the link master, but it is greyed out when I...
9
5252
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform relates to the main form using an identity key (this works). The second subform relates to both the main and first subform. But I want to be able to move to a record in subform1 and have the corresponding records in subform2. Similar to the Customers Order form in the Northwind db. ...
7
12291
by: ApexData | last post by:
I am using the following code in my TabControl to manage subform loads. The code assigns the subForms SourceObject. - Do I also need code to DeAssign the SourceObject when leaving the Tab, I'm thinking the Table will stay open otherwise ??? - Do I also need to use code to Assign the Child&Master Links, or can I just type the names into...
3
2234
by: Robert McEuen | last post by:
Using A2K3, Windows XP I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted): tblIssue PK_IssueID (autonumber, primary key) IssueName (text) tblArea
4
6036
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase this is all very difficult to explain in words, please bear with me as I endevour to explain what it is I am trying to do. It would be helpful if I...
3
2581
by: 6afraidbecause789 | last post by:
Think school - students - discipline interventions - misbehaviors - staff for this one....On a mainform frmStudentInterventions, I have linked a subform (sfrmMisbehaviors) with another subform (sfrmInterventions) with the Child and Master fields "InterventionID." This is tested and works - as users click through the continuous list of...
5
2273
sickenhoofer
by: sickenhoofer | last post by:
I have a form w several subforms. The ultimate goal would be to click on a location, and have the data in the other subforms change to the data specific to that location. For this form, there are 4 main tables (below). Here is the pertinent detail for the tables involved. tblProviderMain (table 1) ProviderMainID (PK, Autonum) ...
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.