Combining the data from various fileds and add to a memo field in a table

P

PS

Hi All,

Please help for following scenario!

I need to have a table cointaining fields:

EventID
CaseID
EventDate
StartTime
StopTime
EventDescription

I need to add a command to combine all the fileld above and automatic add
and apend it to a memo field in another table to become a summary event
detail, for example:

***Start***
EventID : 1234
CaseID : A123
EventDate : 12/08/2004
StartTime : 12:15PM
StopTime : 13:25PM
EventDescription : Test for event logging 1
***End***

***Start***
EventID : 2234
CaseID : A125
EventDate : 12/08/2004
StartTime : 18:15PM
StopTime : 19:25PM
EventDescription : Test for event logging 2
***End***

Thank!

PS
 
P

PS

Hi Andy,

Yes, my purpose to doing so is actually for viewing and reporting purpose, i
need it also to export to excel spreasheet within single column as we need
to submit to our HQ using fixed format.
Appreciate if you could help me on how to write the query in order to
produce this result.

Thank.
PS
 
A

Andy Williams

My first thought would be why do you want to reproduce all the data in
another table. That defeats the object of having a database in the first
place.

If the combined field is just for reporting or viewing purposes then you
could use a query to produce the combined field and display it in a form or
report.

If you want help on how to write the query let me know.

HTH

Andy W
 
A

Andy Williams

If you name the fields in your table

fldEventID
fldCaseID
fldEventDate
fldStartTime
fldStopTime
fldEventDescription

then the query to get your combined field is

select "***Start***
EventID : " & [fldEventID] & "
CaseID : " & [fldCaseID] & "
EventDate : " & [fldEventDate] & "
StartTime : " & [fldStartTime] & "
StopTime : " & [fldStopTime] & "
EventDescription : " & [fldEventDescription] & "
***End***" as fldCombined
from YourTableName

Note that at the end of each line you need to use Shift + Enter to get a
Carriage Return Line Feed into the query otherwise it will appear as one
line.

You can use this query as the basis for a Form or Report.

Exporting to Excel is a bit more complicated so I'll have to get back to
you.

HTH

Andy W
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top