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

SubForm is not visible

Dear reader,

In case I have selected a record in the main Form which has no reference
records in the SubForm the SubForm is not visible.

Is there a possibility to check of the record collection for the SubForm is
null.

Or a check on the status of the SubForm, visible yes or no (or False or
True).

Thanks for any help.

Kind regards,

Simon van Beek
Jan 18 '06 #1
1 2153
One quick way to check for relevant records is using DCount. Something
like:

If DCount("SomeField", "Table", "SomeField='" & strSomeVariable & "'")
0 Then

' whatever code you want to execute
' if there is a relevant record, like
sfmSubform.Visible = True
End If

Like any control, you can check to see of the subfom is visible by
referncing it's 'Visible' property:

If Forms("FormName").sfmSubform.Visible Then
....
End If

Not sure if that answers your question???

Jan 18 '06 #2

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

Similar topics

2
by: deko | last post by:
I have two subforms within a particular form. The one on top is a datasheet of transactions; the one on the bottom is a summary of totals. I would like to have the datasheet fill the entire...
7
by: Caroline Bradford | last post by:
Hi there, I wonder if there is a kind and knowledgeable person out there who can help me with a sticky problem. I have a form with a subform which shows detailed data. For complicated reasons,...
1
by: Matthew Wells | last post by:
I have a a parent form with a subform. The parent form has two command buttons to change the subform view to single form view and datasheet view respectively. I can't seem to get this to work. ...
5
by: Lyn | last post by:
Hi, I have a form which contains a number of subforms in different pages of a tab control. In the detail section of each subform, I list records related to the main form record, but from...
1
by: sasan3 | last post by:
I have a main form "topform" contaning "subform1" and "subform2" The goal is: I need to requery subform2 on CURRENT event of subform1, and I need to load subform2 contents based on settings on...
6
by: ryan | last post by:
I created in design view a subform within a subform. However the subform within the subform in only visible in design view. In form view the subform within the subform is not visible. I have...
1
by: dBNovice | last post by:
Please help! I have 3 forms: Task, Subtask, Elements. Elements is a subform of Subtask and Subtask is a subform of Task. I am able to navigate from Task to Subform to Element and from Element to...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
3
by: ckrows | last post by:
I have a main form with a button that makes a subform visible. I added a button in the form footer of the subform that is supposed to hide the subform. This does not work because the focus is on...
1
by: woodey2002 | last post by:
Hi Everyone and many thanks for your time.. I am trying to begin access and a bit of VBA i am enjoying it but I have a annoying problem I just can’t get any where on. My databse mostly includes...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.