PC Review


Reply
Thread Tools Rate Thread

Combined text and variable in a message box

 
 
vrzimmerm@hotmail.com
Guest
Posts: n/a
 
      27th Sep 2007
I'm trying to display message box that combines text along with a
variable that was previously defined. The following code only
displays the date that's contained in the variable Dt, but it doesn't
display the text. How can this be done?


Dt = "Records prior to " & Dt & " have been removed"
MsgBox Dt

Thanks.

 
Reply With Quote
 
 
 
 
JW
Guest
Posts: n/a
 
      27th Sep 2007
This works just fine for me.
Dt = 5
Dt = "Records prior to " & Dt & " have been removed"
MsgBox Dt

Not sure why it's not working for you. You could always use something
like:
Dt = 5
MsgBox "Records prior to " & Dt & " have been removed"
or
Dt = 5
msgString = "Records prior to " & Dt & " have been removed"
MsgBox msgString

vrzimm...@hotmail.com wrote:
> I'm trying to display message box that combines text along with a
> variable that was previously defined. The following code only
> displays the date that's contained in the variable Dt, but it doesn't
> display the text. How can this be done?
>
>
> Dt = "Records prior to " & Dt & " have been removed"
> MsgBox Dt
>
> Thanks.


 
Reply With Quote
 
Incidental
Guest
Posts: n/a
 
      27th Sep 2007
Hi

your code seems ok though it looks like you are changing the data held
in Dt to the string of text rather than your date variable??

MsgBox "Records prior to " & Dt & " have been removed"

seems to work fine for me.

S


 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      27th Sep 2007

MsgBox "Records prior to " & Dt & " have been removed"

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" wrote:

> I'm trying to display message box that combines text along with a
> variable that was previously defined. The following code only
> displays the date that's contained in the variable Dt, but it doesn't
> display the text. How can this be done?
>
>
> Dt = "Records prior to " & Dt & " have been removed"
> MsgBox Dt
>
> Thanks.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: message parts not being re-combined Brian Tillman Microsoft Outlook Discussion 0 15th Apr 2008 03:20 PM
Extract Outlook Message Text to Access as Variable Todd Shillam Microsoft Access 2 13th Sep 2005 01:44 AM
text and values combined in one cel =?Utf-8?B?QmFydA==?= Microsoft Excel Misc 1 14th Dec 2004 08:36 AM
Combo box and text box combined Steve Microsoft Access Forms 1 20th Jun 2004 05:47 PM
how to read a number and text combined text into different columns su Chen Microsoft Access Macros 0 8th Jan 2004 05:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 PM.