Subform not displaying data (1 Viewer)

Coxylaad

New member
Local time
Today, 22:47
Joined
Jan 11, 2022
Messages
21
Hi everyone,
I have a bit of a strange on here.

I have a form that displays estimate details for a customer. part of the estimate record is the ContactID, that references the contact in the CustomerContact table.
I have a combobox on the estimate form that is bound to the contactID and the rowsource is set to select all contacts that are available for that customer. in other word you choose the contact that is responsible for this estimate.

Underneath the combo box I have put a subform that hits the customerContact form, and displays a single record to show the telephone, mobile and email of the contact. the linked fields of the subform is the ContactID. Its all setup correct as far as I can see.

Doesnt work - doesnt display anything. yet when I open the subform as a form on its own its displaying data. its almost like the contactID's arent matching, which they clearly are!

Any ideas on this? Ive been messing about with it for 2 days now, as far as I can see it should work!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:47
Joined
Feb 19, 2013
Messages
16,553
providing the names are not misspelt, should work. suggest upload a cut down copy of your db to demonstrate the issue otherwise could spend a long time guessing.

Alternative to a subform for this type of thing is to bring the required data in your recordsource (you don't need to display it) and use unbound controls to reference the columns with something like this in the controlsource

=mycomboname.column(2)
 

Coxylaad

New member
Local time
Today, 22:47
Joined
Jan 11, 2022
Messages
21
I've managed to sort it. it just wouldnt work when trying to link a combobox with the contactid as a control source, so I created a text box and populated it with the contactID on the afterupdate event, then linked that with the subform. works perfectly. weird.
 

Coxylaad

New member
Local time
Today, 22:47
Joined
Jan 11, 2022
Messages
21
edit, made it even easier by setting the master field to be [cbCustomerContact].[Value]
I mustnt have been happy that i was just reference the field of the current record and not a specific item on the form.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:47
Joined
Jul 9, 2003
Messages
16,245
I've managed to sort it. it just wouldnt work when trying to link a combobox with the contactid

My guess is that you've got the wrong bound column in your combobox that's why it wouldn't work.

I have a blog about combo boxes which might prove useful:-

 

Gasman

Enthusiastic Amateur
Local time
Today, 22:47
Joined
Sep 21, 2011
Messages
14,048
No, it should work fine
However my combo is unbound and so has the first entry in the record source.
If you form opens with an empty combo, that is how I would expect it to work?
1652258701148.png

1652258744839.png
 

Users who are viewing this thread

Top Bottom