[AccessD] error in code

Stuart McLachlan stuart at lexacorp.com.pg
Sun Apr 18 18:52:42 CDT 2004


On 19 Apr 2004 at 0:17, Pedro Janssen wrote:

> Hello Group,
> 
> why isn't this part of a code not working
> 
> for i  = 1 To 9
> If "chb" & i & "c31") = True Then
>     .Item("Code" & i).Value = "**     geen code"
> End If
> Next i
> 
> the error is:  Error 13, Description:  Type Mismatch
> 

Apart from the problems mentioned by others (the missing "(",  the 
missing "me.controls" or "." before "chb1"),  this will result in 
spaces in your control names ie "chb 1c31" to "chb 9c31" and "Code 1" 
to "Code 9"

UNless you do have spaces in the control names, you need to use 
Format(i) or similar to get rid of the leading space.



 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.






More information about the AccessD mailing list