Solved

Type-Declaration character does not match declared data type Error Using Time$

Posted on 2003-10-27
6
300 Views
Last Modified: 2013-12-03
Hi.

I get Type-Declaration character does not match declared data type when the following line of code tries to execute:

Txt_Log.Text = Txt_Log.Text & Time$ & " - Com Port " & ComPort & " Opened."

I tried just copying this line to an empty program and it works fine... So what else could be causing the problem?

Thanks
0
Comment
Question by:Dormouse31
6 Comments
 
LVL 4

Expert Comment

by:eric0213
ID: 9628829
All looks pretty standard... Maybe try CStr(Time) instead of Time$ though I don't see why that'd be a problem...
0
 
LVL 9

Expert Comment

by:Dang123
ID: 9628888
Can you post the function the line is in?
0
 

Author Comment

by:Dormouse31
ID: 9628898
Thanks for the help, but I just figured it out. I stupidly had a variable named Time...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 9628906
Time is a reserved word, are you using it as a variable name?
0
 

Author Comment

by:Dormouse31
ID: 9629187
Yeah... I was. i fixed it
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9629381
That's OK, just see posting time for each comment. Cheers
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now