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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"type mismatch" error?

Status
Not open for further replies.

Reimondo

Technical User
Feb 26, 2003
26
AU
Hi,

When i try to run a macro via a button in a form, I get a "type mismatch" error while the macro is running.
What does this error mean?

The macro I am running has links to other smaller macros depending on the ID field value in the form. The macros mainly involve runSQL actions which insert data into the subform table.

Your help will be most appreciated,


Raymond
 
It usually means that the types you are connecting are different.. ie ..you are matching an integer and a string.

I would do checks to make sure that all my connecting values are the same variable. This is especially important when using form variables. Those are typically string even for numbers and can cause some problems initially.

Look into the

Cint
Cstr
....

The C (i think) stands for convert. So Cint(....) makes the variable an integer.

Hope this helps..

Thanks,
Jeremy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top