Textbox problems

mlamont

Registered User.
Local time
Today, 11:30
Joined
Jun 25, 2001
Messages
45
I am having a problem with a function that I want to use with a textbox.

What I want to have happen is when the form loads, inside the textbox I want information to appear. I want the text inside to be information from another form + T + the date, this is the code I wrote.

[Timesheet]=[Forms]![Claim Information_health]![Claims ID] + " - T - " + Date()

I want the text to come out as 65 - T - 19-Jun-02

However I am getting an error message that states there is an Type Mismatch.

Can anybody help me?
 
Format

[Timesheet]=[Forms]![Claim Information_health]![Claims ID] + " - T - " + Date()

should be:

[Timesheet]=Forms![Claim Information_health]![Claims ID] & " - T - " & format(Date(),"dd-mmm-yy")

as for the type mismatch check to make sure that the Timesheet field is in fact text in the table design. The message is complaining that you are trying to make something (probably Timesheet) something it is not suppose to be because of the way you set up the table.
 
Last edited:
I hope this is not all the problem is... but I think you are trying to concatenate data....

In this case try this, just syntax error....

[Timesheet]=[Forms]![Claim Information_health]![Claims ID] & " - T - " & Date()

[Timesheet] format should be general or nothing.....

Regards,
Brian
 
Thank you

That worked...... thank you so much!!!!
 

Users who are viewing this thread

Back
Top Bottom