Converting number to text in messagebox

Ravi Kumar

Registered User.
Local time
Today, 14:56
Joined
Aug 22, 2019
Messages
162
Dear all,

In my main menu form I have provided a button to check the tasks due as a reminder.
In this assigned to field is coming as number , because in in my table it is of number type & it is linked to contact table to retrieve the data.
So in my message box I need this number to be converted as the data stored my contact table.
& also I can't increase the size of the message box so it is looking messy.
My Db is attached kindly check once & suggest me the solution.
 

Attachments

Should probably build a report if you want data arranged horizontally because cannot make intrinsic message box wider.

What is vTab supposed to do? Apparently it should be vbTab. Add Option Explicit to module header and compiler will show vTab is an error.

If you want text instead of ID number, build a query that joins tables and use that query as data source in code. Probably should apply filter criteria so only tasks that are still due are retrieved.

SELECT Tasks.Title, Contacts.Company, Tasks.[Due Date], Tasks.[Completed Date]
FROM Contacts RIGHT JOIN Tasks ON Contacts.ID = Tasks.[Assigned To]
WHERE (((Tasks.[Completed Date]) Is Null));

Strongly advise not to use spaces nor punctuation/special characters in naming convention.
 
Last edited:
Should probably build a report if you want data arranged horizontally because cannot make intrinsic message box wider.

What is vTab supposed to do? Apparently it should be vbTab. Add Option Explicit to module header and compiler will show vTab is an error.

If you want text instead of ID number, build a query that joins tables and use that query as data source in code. Probably should apply filter criteria so only tasks that are still due are retrieved.

SELECT Tasks.Title, Contacts.Company, Tasks.[Due Date], Tasks.[Completed Date]
FROM Contacts RIGHT JOIN Tasks ON Contacts.ID = Tasks.[Assigned To]
WHERE (((Tasks.[Completed Date]) Is Null));

Strongly advise not to use spaces nor punctuation/special characters in naming convention.
Thank you , I created a query as you told but the field due date is showing as empty.
 
If you want to use a "messagebox" but the built in one doesn't provide the features you need, build a form. Open it modal so it acts like a messagebox.
 
Query works for me. Records that have a due date show a due date. Not all task records have a due date.
 
Query works for me. Records that have a due date show a due date. Not all task records have a due date.
Thank you for your reply, And I do know that records which have due will show the due date .
but the problem was even if it is due ,title & assigned to was visible & due date was not , made some changes in SQL and now it is good.
Thank you so much for your help.
 

Users who are viewing this thread

Back
Top Bottom