subform linked to calculated field

John S

Registered User.
Local time
Today, 18:46
Joined
Jun 30, 2000
Messages
18
I have a form displaying postcodes (amongst other things) from an underlying table MEMBERS. There is also a calculated field in the form which shows the first two letters of the current postcode. A separate query qryFirst2 simply usesthe LEFT function to return the first 2 letters of all the postcodes in the table.

Problem: I want to have a subform listing all records where the postcode starts with the same 2 letters as the one currently viewed on the form. When I try to create a subform the 'one' side only allows me to choose bound fields on the form - I can't set this to be the calculated 'first two' field.

Question: is there any way to get the 'one' side of a form/subform relationship to match a calculated field?

thanks
John
Bristol UK
 
Try basing your main form on a query instead of directly to the table, and add a field to the query that calculates the 1st two letters of your postcode field.
pcleft: Left([postcode], 2)
You should then be able to include the new field on your form, and link it to the subform.
 
Jonathan - many thanks, it now works OK
 

Users who are viewing this thread

Back
Top Bottom