Firstly - Happy New Year To All
Below is some code that populates a Contact list box for a Customer:
This works fine when form is loaded and even when searching through records.
However if a new contact is added (using a different form) when the list box is requeried from the other form all the data is displayed again with the exception of the 'Contact' which as can be seen above is a concatenated field (Title, FirstName, Surname).
The code below is used in the new contact form to requery the database:
The curveball is that the above worked fine until my return to work this week. During shutdown the company moved to SBS Server and now this odd event is happening.
No data is lost (tables are OK) and if form is closed and opened again the 'Contact' name is visible. It appears to only occurs when the form has lost focus and gets requeried? Can anyone shed any light on this?
Thanks for any help.
This is one example, the same applies to any other list boxes or combo boxes that get requeried (again only concatenated fields are affected - and initially data is visible?)
Mark...
Below is some code that populates a Contact list box for a Customer:
Code:
SELECT CustomerContactTbl.CustomerContactID, CustomerContactTbl.CustomerID, [CustomerContactTbl]![Title] & " " & Trim([CustomerContactTbl]![FirstName] & " " & [CustomerContactTbl]![Surname]) AS Contact, CustomerContactTbl.Position, CustomerContactTbl.Tel AS [DDI Tel], CustomerContactTbl.Mobile, CustomerContactTbl.EMail
FROM CustomerContactTbl
WHERE (((CustomerContactTbl.CustomerID)=[Forms]![CustomersFrm]![CustomerID]));
This works fine when form is loaded and even when searching through records.
However if a new contact is added (using a different form) when the list box is requeried from the other form all the data is displayed again with the exception of the 'Contact' which as can be seen above is a concatenated field (Title, FirstName, Surname).
The code below is used in the new contact form to requery the database:
Code:
Form_CustomersFrm.lstContact.Requery
The curveball is that the above worked fine until my return to work this week. During shutdown the company moved to SBS Server and now this odd event is happening.
No data is lost (tables are OK) and if form is closed and opened again the 'Contact' name is visible. It appears to only occurs when the form has lost focus and gets requeried? Can anyone shed any light on this?
Thanks for any help.
This is one example, the same applies to any other list boxes or combo boxes that get requeried (again only concatenated fields are affected - and initially data is visible?)
Mark...