473,326 Members | 2,134 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,326 software developers and data experts.

Reports help

I have got two lots of data in a table, one of them gets a premise name and town from one table (all clients) and the other from another (premises list) I need to be able to only display the all clients data if there isnt any data from the premises list (and hide the all clients data if there is)

Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2. If IsNull(Me.Premises) Then
  3.     Me.Premise.Visible = True
  4.     Me.Posttown.Visible = True
  5.     Me.Premises.Visible = False
  6.     Me.Town.Visible = False
  7.     Else
  8.     Me.Premises.Visible = True
  9.     Me.Town.Visible = True
  10.     Me.Premise.Visible = False
  11.     Me.Posttown.Visible = False
  12. End If
  13. DoCmd.Maximize
  14. End Sub
  15.  
This is the code i have but its not working it just displays the data from one of the tables not the other, what am i doing wrong??
Sep 27 '07 #1
1 1043
Scott Price
1,384 Expert 1GB
You'll need to explore a right/left join in your select query to display the data you want. Then write the code in for displaying/hiding when no data.

In your query design view, double click on the line that represents the join between the two tables. Choose the option that best fits your situation, and test to make sure it works :-)

Regards,
Scott
Sep 28 '07 #2

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

Similar topics

2
by: Andrew | last post by:
Hi there: I can successfully control a report's GroupLevel ControlSource property by using: ..Reports!rptEESTMT_A.GroupLevel(i).ControlSource = "CorpName" where rptEESTMT_A is the actual...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
4
by: sparks | last post by:
We have a database that reads in and formats raw data. We were using queries to format the data per person and outputing reports. The other database has the persons personal information. I changed...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: mehul | last post by:
Hi, I am trying to use Active Reports v1.1 (Build 1.1.0.84) in a ASP.NET application. Is it possible to use it through the COM interlop as Crystal Reports for .NET which comes built in with...
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
3
by: k2storm | last post by:
I'm having problems with Reports and I'm seeking some help, or advice on how to solve this problem. Any help will be much appriciated! It’s hard to explain but I will try to do my best: In my...
7
by: google | last post by:
I am trying to automate the way reports are printed in an Access 2003 database - I have ~200 records (people) who require between 5 and 10 customized reports (depending on values within certain...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.