Form displays different data than the source query! (1 Viewer)

davegillian

New member
Local time
Today, 09:02
Joined
Apr 13, 2006
Messages
9
My database has a linked table that looks at my email inbox.

A lookup query takes the fields from, subject and body from this table, sorts the records (emails) alphabetically and then outputs 1 record (email) as I have set the Top Values property to 1.

I also have 3 forms - one that displays the results of the above query and two that find duplicate records in my customer table (one by using the from field as criteria against an email field in my customer table and one by extracting the surname, which is contained in the email subject as criteria against surname in my customer table).

The query and each of these 3 forms work fine individually but I have another form that contains the 3 subforms and here is where the strangest thing happens...!!

On this form the 2 duplicates subforms work fine but the subform that displays the results of the query (which is effectively displaying the information from 1 email) dispalys the correct from field (the 1st alphabetically) but then displays the subject and body fields from the next email (the 2nd alphabetically).

So if I have emails from Andy Smith (andy.smith@email.com) and Joe Jones (joe.jones@email.com) in my inbox and Andy Smith (andy.smith@email.com) in my customer table then the form will display:

Subform1:

From:andy.smith@email.com
Subject:New Customer - Joe Jones
Body:Name - Joe Jones, Email - joe.jones@email.com

Subform2:

Customer ID:1
Email:andy.smith@email.com

Subform3:

Customer ID:1
Surname:Smith

Please please please help me because I can't think of any explanation as to why this would happen and it's driving me insane now!

Cheers,

Dave
 

Users who are viewing this thread

Top Bottom