show field in text box when query returns no records

rmulder

Registered User.
Local time
Today, 15:10
Joined
Feb 1, 2010
Messages
77
I have two tables in a query. A employee table. And a time-off table with time-off record. I have a combo box to select the employee whose records I'm interested in, and a few other ways to easily filter the time-off records.

My issue is that when I filter out all records the bound text boxes showing some basic information about the employee go blank.....

Even if there's no time-off records for the date range im interested in I'd still like the info from the Employee table to show up. Can this be done?
 
You need what's called an Outer Join. In your query you would have the link between the employees table and the time off table and it would be linked to the employeeID. So you can double click on that link and it will open up a dialog with 3 options. The first will be the one that is currently selected. You would then choose the one which says something like this:

Select all records from table Employees and only those records which match from table Time-off. Make that selection, click okay and you should see an arrow on that link pointing to the time off table from the employees table. That should do it.
 
that didn't seem to work. Still don't see the employee information when all the time off records are filtered out. Is there no way to maybe use a unbound text box to get this info based on my combo box in the form with the employeeid im interested in. It's only 4 to 5 fields i want to see in the header. Like their hire date, completed years etc...

Something like setting the control source of a text box = [Employees].[EmployeeID].[Start_Date]. That syntax is wrong I know, but I'm wondering if it'd be better because the join type isnt working.
 
Can you post a copy of the database (with bogus data, of course) so we can take a look at what you've got?
 

Users who are viewing this thread

Back
Top Bottom