473,837 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form/Subform Data Linkage Problem

sickenhoofer
19 New Member
I am having some problems with a form and its subforms. It was designed to click on a list of numbers on a subform, which causes another subform's data to change to data relevant to the number selected.

Attached are 2 pictures: 1. snapshot of master form w both subforms; 2. snapshot of relationships for tables involved in problem. Here is the main set up info:

Table 1 = tblProviderMain
ProviderMainID (PK - autonum)

Table 2 = tblProviderNumb ers
ProviderNumberI D (PK - autonum)
ProviderMainID (foreignKey)

Table 3 = tblServiceLocat ions
ServiceLocation ID (PK - autonum)

Table 4 = tblProviderNumb erJoined2Locati on
ProviderNumberJ oined2LocationI D (PK - autonum)
ProviderNumberI D (foreign Key from Table 2)
ServiceLocation ID (foreign Key from Table 3)

Subform set up info:
Subform 1
Name = frmProviderNumb ers_BCBSList
Source = frmNumbers_BCBS (the source of this form is a qryNumbers_BCBS as follows)

SELECT [NumberType] & " - " & [Number] AS NumberAndType, tblProviderNumb ers.ProviderNum berID, tblProviderNumb ers.ProviderMai nID
FROM tblProviderNumb ers
WHERE ((([NumberType] & " - " & [Number]) Like "BCBS" & "*"));

Subform 2
Name = frmProviderBill ingNumbers_BCBS _sbfrm
Source = frmProviderBill ingNumbers_BCBS (source for this form is the following qryProviderBill ingNumbers_BCBS )

SELECT DISTINCT tblProviderNumb ers.ProviderNum berID, tblProviderNumb ers.ProviderMai nID, tblProviderNumb ers.EnterDate, tblProviderNumb ers.NumberType, tblProviderNumb ers.ProviderbyL ocationCode, tblProviderNumb ers.StateCode, tblProviderNumb ers.Number, tblProviderNumb ers.EffectiveDa te, tblProviderNumb ers.Termination Date, tblProviderNumb ers.Specialty, tblProviderNumb ers.Taxonomy, tblProviderNumb ers.EnrollDate, tblProviderNumb ers.TermEnrollD ate, tblProviderNumb ers.Reactivatio nDate, tblProviderNumb ers.GroupNumber , tblProviderNumb ers.Verified, tblProviderNumb ers.Source, tblProviderNumb ers.VerifyDate, tblProviderNumb ers.Status, tblProviderNumb ers.Comment, tblProviderNumb erJoined2Locati on.TRADPinNumbe r, tblProviderNumb erJoined2Locati on.ServiceLocat ionID, tblProviderNumb ers.BenefitCode , [tblLocations_Se rvice].[ServiceLocation ID] & " - " & [ServiceLocation Addr1] & ", " & [ServiceLocation Addr2] AS ServiceLocation
FROM tblProviderNumb ers INNER JOIN (tblLocations_S ervice INNER JOIN tblProviderNumb erJoined2Locati on ON tblLocations_Se rvice.ServiceLo cationID = tblProviderNumb erJoined2Locati on.ServiceLocat ionID) ON tblProviderNumb ers.ProviderNum berID = tblProviderNumb erJoined2Locati on.ProviderNumb erID
WHERE (((tblProviderN umbers.Provider NumberID)=[Forms]![frmProviderMain]![frmNumbers_BCBS List].[Form].[ProviderID]) AND ((tblProviderNu mbers.NumberTyp e)="BCBS"));

When end user clicks on a number listed on the left subform (frmProviderNum bers_BCBSList), an event procedure causes the detail of the subform on the right (frmProviderBil lingNumbers_BCB S_sbfrm) to change. Here is the coding for the event procedure contained within properties of first subform. It refers to control NumberandType.

Private Sub NumberAndType_C lick()
Forms![frmProviderMain]![frmProviderBill ingNumbers_BCBS _sbfrm].Requery
End Sub

The problem:
When I open the main form (frmProviderMai n) I get a message box to ENTER PARAMETER VALUE . . . .which contains text from query above . . ."[Forms]![frmProviderMain]![frmNumbers_BCBS List].[Form].[ProviderID]"

I appreciate any help. My head is getting kind of sore from beating it against the wall!
Attached Images
File Type: jpg MainFormSnapshot.jpg (16.8 KB, 110 views)
File Type: jpg TableRelationships.jpg (16.9 KB, 99 views)
Jun 19 '09 #1
0 1712

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

Similar topics

4
4048
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving to the next record. So, in the BeforeUpdate event of the form itself I have the following code:
3
1963
by: Earthling | last post by:
Any help would be appreciated to solve the following simple problem that I will describe. *** There is a form called "red chocolate form". The form has a particular subform field that has a checkmark box that is selectable as on or off (on if there is a checkmark inside it). The table that contains the data for the form is known as "red chocolate
25
10284
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
4
7026
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
7
2388
by: Stu | last post by:
Hi, I have a combobox who's values change the recordsource of the form. Within this form, there is a subform, whos records also need to change pending the value in the combobox. I am able to get the main forms values to change, but not the subform. I've only been using Access 97 for about a month now, so it might be fairly simple. Here is my code: Private Sub combo1_Change() If Me.combo1.Value = "Standard Procedures" Then...
6
3807
by: MLH | last post by:
When the vehicle entry form (frmVehicleEntryForm) first opens, the additional owner SubForm control (frmAddnlOwnrListSubForm) is enabled. You can click on it and it will accept the focus. But after you enter data to the first field on the main form (a VIN#), that is not the case. The SubForm control becomes disabled and will not accept the focus. Dunno why. There's no child/master link fields. They have no settings - at least not in design...
3
7707
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent form affects data in the subform. I've had this type of setup often, but I've run across a couple forms where this has caused an "enter parameter value" pop up for each reference to the parent control in the query when the main form is closed. ...
11
7185
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my mind I am wonder if this is causing my problem, but I don’t want to go through the work to convert to DAO unless I know it is truly in my best interest.) I am having problems getting a requery to show up consistently on a couple of forms. I have...
4
1436
by: sparks | last post by:
TRYING TO USE SHORT NAMES might make more since. I have a main form and its tied to tblmain subform1 and it is tied to tbl1 subsubformA on subform1 tied to tbl2 MAIN---tblmain----autoid subform1----tbl1----ID subsubform1----tbl2----ID
0
9851
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9695
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9420
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7013
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5680
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
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
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.