A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set up db to lookup and concatenate large amounts of text



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2009, 07:11 PM posted to microsoft.public.access.tablesdbdesign
Pamela
external usenet poster
 
Posts: 193
Default Set up db to lookup and concatenate large amounts of text

I have created a db w/ a form to allow the user to input in fields and select
through combo boxes & list boxes certain info pertaining to a physical job
they just completed. My goal is to use this data to lookup and concatenate
fairly large amounts of text into a single paragraph onto the form which the
user can then copy & paste into our clients' system. Would it be easiest to
accomplish this by writing the long and complicated If statements into the
code or use tables for each criteria? Or perhaps another solution? I
currently have it in excel but it is very limited in input and access allows
many more options.

Thanks so much!

Pamela
Ads
  #2  
Old December 16th, 2009, 11:34 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Set up db to lookup and concatenate large amounts of text

Hi Pamela,

Put the paragraph parts into one or more tables and make your code
generic so that as the needs change, the use can add, update and delete the
paragraph parts in the tables, without any changes needed to your code. As a
computer science professor of my used to say: "Don't put data in your code.".
Your code should be independent of the data and work with any data the user
supplies. You might have a structure something like this:

tblParagraphParts
PartID
Description
TheText

On you form, say in a combo box, it could list the PartID (maybe
hidden) and the description. When generating the paragraph you would use
something like this to get the text for the selected part:

strText = DLookup("TheText", "tblParagraphParts", "PartID = " & [cbPartID])

Hope that helps,

Clifford Bass

"Pamela" wrote:

I have created a db w/ a form to allow the user to input in fields and select
through combo boxes & list boxes certain info pertaining to a physical job
they just completed. My goal is to use this data to lookup and concatenate
fairly large amounts of text into a single paragraph onto the form which the
user can then copy & paste into our clients' system. Would it be easiest to
accomplish this by writing the long and complicated If statements into the
code or use tables for each criteria? Or perhaps another solution? I
currently have it in excel but it is very limited in input and access allows
many more options.

Thanks so much!

Pamela

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.