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

How to filter and access parent records when the child records are empty?

6
I am having problems accessing full records, (displaying parent and child information) if the child record is empty.

I have managed to fix this when showing records in datasheets using queries, using the Left Join, rather than inner join.

But...
I have a candidate table and a qualification table. Each candidate can have more than one qualification, but can also have no qualifications.

I have a Tab control (form) showing candidate information on one tab and the qualifications in another.
I have combo boxes to find particular users but if they dont have a child (qualification) record they are not found.

Is there any way to either:
-create a blank child record when a new parent record is created?
-show the record, regardless of the child record being empty?

Here is the code from my combobox AfterUpdate:
Expand|Select|Wrap|Line Numbers
  1. Dim rs As DAO.Recordset
  2.     If Not IsNull(Me.cmbCandidate) Then
  3.         If Me.Dirty Then
  4.             Me.Dirty = False
  5.         End If
  6.         Set rs = Me.RecordsetClone
  7.         rs.FindFirst "[CandidateID] = " & Me.cmbCandidate
  8.         If rs.NoMatch Then
  9.             MsgBox "Not found: filtered?"
  10.         Else   
  11.             Me.Bookmark = rs.Bookmark
  12.         End If
  13.         Set rs = Nothing
  14.     End If
  15.  
Nov 2 '10 #1

✓ answered by TheSmileyCoder

You should be able to make it work using left joins, and I would deffinately recomend against inserting blank records.

However, if you can have multiple qualifications for a single candidate, I would suggest putting the qualifications into a linked subform instead, but that is for you to decide.

If your code is not finding the record, Im guessing there most be something wrong with your joins, so if your still having trouble, try posting the SQL.

1 2802
TheSmileyCoder
2,322 Expert Mod 2GB
You should be able to make it work using left joins, and I would deffinately recomend against inserting blank records.

However, if you can have multiple qualifications for a single candidate, I would suggest putting the qualifications into a linked subform instead, but that is for you to decide.

If your code is not finding the record, Im guessing there most be something wrong with your joins, so if your still having trouble, try posting the SQL.
Nov 2 '10 #2

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

Similar topics

5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
0
by: RT | last post by:
Hi, I am new to vb .net. How do I access a parent menu from a a child form? I want to enable the parent menu item when the child form is closed. Thanks. RT
7
by: Ron | last post by:
Hi All, Using Access2000, winXP. Table 1 = tblClients displayed on frmClients via qryClients. 2nd table = tblInvoices shown on frmInvoices via qryInvoices. 2nd table = tblDetails shown on...
2
by: Catch_22 | last post by:
Hi, I have a stored procedure that has to extract the child records for particular parent records. The issue is that in some cases I do not want to extract all the child records only a...
1
by: vidhyapriya | last post by:
when i minimize child window the parent window should be minimize...how it possible..i need code in vb.net anyone tell me
2
by: vidhyapriya | last post by:
is it possible to deactivate parent window form when child window form active if so,can u give some idea or coding about this....i m using vb.net window appln
1
by: scottbouley | last post by:
I'm building a view in SQL Server 2000 Enterprize Manager to find any parent supply request records that are "Open" where all of the child detail records are "Completed". The two tables are related...
0
by: GBarrowcliff | last post by:
VB6, Access 2000 DB with two tables. Master table with Text indexed key ("JDN") (NOT the primary) linked via this key to the "JDN" field in the master table. Child records only contain 3 fields,...
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: 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...
0
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,...
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
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...
0
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...
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...

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.