Report containing Contact Info (1 Viewer)

Futures_Bright

Registered User.
Local time
Today, 05:42
Joined
Feb 4, 2013
Messages
69
Hi all,

I have a query from a colleague for their database.

They have a report which lists a name and contact info - at the moment this is set in the report. However noone has the ability to edit the report outside of developer mode (hence why I'm being asked!). This information will change very infrequently but I'd like to set up something within the database so that they can change it as and when needed.

How would be best to do this? It will be the same contact person for every report until roles change. There is a tblNames which contains the necessary information (although phone no. and e-mail are yet to be populated).

I was thinking adding a field to tblNames as Yes/No to state who will be the contact (ensuring they know to only select one person at a time) and using a SELECT...WHERE line in the unbound textboxes - however this returned #Name? in all fields.

I'm hoping to sort this in the next hour and a half (before I go on holiday) so a quick solution would be much appreciated! Otherwise I'll put it directly in the form now and edit it later when I get another opportunity.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:42
Joined
Feb 19, 2002
Messages
43,302
You can't put SQL statements into a ControlSource. You need DAO code to run the query and copy the field values to the controls. Do this in the Form's Load event -- OR do it in the form that you use to run the reports and place the values in hidden controls. The report would then reference the form fields - so a control source might be:

=Forms!yourform!FirstName
 

Users who are viewing this thread

Top Bottom