VBA Help (1 Viewer)

Trilback

Registered User.
Local time
Today, 04:44
Joined
Nov 29, 2013
Messages
88
I have an unbound text box called summary that pulls data from the below fields after the = sign from my form. The problem is I want it to pull from another table in my access database and the end of the code below like & Remedy_Templetes_List and the field name Summary. The table is called Remedy_Templetes_List and the field name is called Summary

Summary = [Department] & " " & "-" & " " & [Building] & " " & [Room] & " " & "-" & " " & [Class] & " " & "-" & " " & [Affected_#_of_Users] & ";" & " " &
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 18:44
Joined
Jan 20, 2009
Messages
12,851
Sounds like you are trying to get very similar data from two different tables.

This generally means there should only be one table.
 

Minty

AWF VIP
Local time
Today, 09:44
Joined
Jul 26, 2013
Messages
10,368
You can simplify each instance of

& " " & "-" & " " &

to simply

& " - " &

If you want to look a value up in an unrelated table you would need to use a DLookup(), possibly based on a value in your current record.
The syntax and a guide to its use is available in the links in my signature.

It's not very clear from your question how the data relates to each other.
 

Users who are viewing this thread

Top Bottom