Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use table for text in msgbox

Status
Not open for further replies.

omabrugge

Technical User
Oct 5, 2003
3
BE
Hello,
I have a form to be used in 2 languages: Dutch and French
For the message boxes I made a table tblMsgBox with these fields:
MsgID, Picto, bdsNl (prompt Dutch), bdsFr (prompt French), TitelNl, TitelFr.

In a Sub called “sMsgbox” I use a recordset to get the right language for my msgboxes
As long the prompt is only a simple text it works all right.
But if a have a text in bdsNl or bdsFr like
“dkdkdkk” & vbCrLf & “dndndn” or if a need to refer to a control I receive the text of my table literally in my msgbox.
Any suggestions?
Thanks
Oma Brugge
 
Hi Oma,

What I think you need to do is to set up delimiters in your text which you know won't appear in the messages, then in your sub to open the box, do a search for everything between those delimiters and use that. Something like:

"Are you sure you want to delete ;record;"

and the code would replace ";record;" with an id of the current record - or something similar.

If this proves too difficult to implement, I have created a custom dialog box system to hand, where the supplied ones are too limited, but it is a little fiddly to get going.

John
 

Thank you very much for your reply.
I already used the splitfunction to do so and "&" as delimeter, but I really don't know what code to use after this.
something like this ?
If partoftext = vbCrLf then
??? I really have no idea

And it seems even more difficult if a have something like
If partoftext = [a control]
(How can I make Access understand it is a control?)

Perhaps I better write for these kind of msgboxes separate code?

Oma


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top