473,385 Members | 1,487 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,385 software developers and data experts.

Master/Child Link Problem

Good afternoon,

I am struggling with my main form and subform links.
I have a main form (frmFacility) primary key [facilityID] with a command button to open a subform (frmInspectService) foreign key [facilityID]
This works except for the fact that the subform shows all the records and not just the ones related to the main form. I have my relationships set and have added the follow code to the on click event of the command button.

DoCmd.RunCommand acCmdSaveRecord
If Me.FacilityID & "" = "" Then DoCmd.OpenForm "frmInspectService", acNormal, , , acFormEdit, acWindowNormal
Else
DoCmd.OpenForm "frmInspectService", acNormal, "[FacilityID]=" & Me.FacilityID, , acFormEdit, acWindowNormal
End If

Exit_Command416_Click:
Exit Sub

Err_Command416_Click:
MsgBox err.Description
Resume Exit_Command416_Click

There does'nt seem to be a property for the pop-up form to set the Master/Child relationship.

Any Ideas ?
Thanks again in advance.
Jerry
Oct 9 '07 #1
1 1314
I think you missed out one comma:

DoCmd.OpenForm "frmX", acNormal, , "[FacilityID]=" & Me.FacilityID
Oct 9 '07 #2

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

Similar topics

3
by: Mark C | last post by:
I have a unbound form with a tab control with four tabs in an Access 97 database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can...
2
by: Chewy1026 via AccessMonster.com | last post by:
Is this even possible. To be able to have a subform where the Master field on the main form is linked to the subform via 1 child field OR another? So the table for the main form, can be matched...
7
by: Martijn Saly | last post by:
Hi there, I've created a master page with some controls on it, a Calendar control among others. Now depending on the date(s) selected, the content page needs to be updated. In the masterpage...
2
by: gencode | last post by:
I have a logout link in a master page...when the link is pressed I want to capture that event in the child page, not the master page, becase there is some processing I want to do in the child...
4
by: Mikaël PLOUHINEC | last post by:
Hello, I have created a master page with a css. How can I use css in the children pages? The css must be declared in the <head</headsection. Does I have to import all my css in my master? Is...
5
by: Swinky | last post by:
I have a form "AccountInfo" that contains company names. I have inserted a subform "Contacts" with contact names and have established parent/child relationships between the two forms. All works...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
11
imrosie
by: imrosie | last post by:
Hello Experts This is a hard one (I still speak newbie). An expert may think it's not a big deal, but, I am trying to replace my Main Order form with a subform because of the following: ...
1
by: Yubin | last post by:
Hello, I'm new to the forums and I wasn't able to find anything in my searches so here we are. I have a DB with a many-2-many relationship. I have a form that has 3 comboboxes: Project #, Last...
4
by: harijay | last post by:
Hi I am new to writing module and object oriented python code. I am trying to understand namespaces and classes in python. I have the following test case given in three files runner , master and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.