Compiler Error:Invalid use of property (1 Viewer)

aman

Registered User.
Local time
Today, 14:46
Joined
Oct 16, 2008
Messages
1,250
Hi guys

I am getting this error when I try to call a sub procedure written in a module from a form.
I have written the following code in Module1:

Code:
Sub Reason(aa As ComboBox)
aa.AddItem "No Reference Number available"
aa.AddItem "No Reference Number available-too many records"
aa.AddItem "Reference Number available"
aa.AddItem "Reference Number available but not found on system"
aa.AddItem "Other"
End Sub

And I have written the following code in the form load event.

Code:
Private Sub Form_Load()
Call Reason(Me.Combo22)    ' [COLOR=darkred]Error.Invalid use of property
[/COLOR]End Sub

Could anyone please solve my problem.

Regards
Aman
 

CraigWarmy

Registered User.
Local time
Today, 14:46
Joined
Feb 13, 2009
Messages
30
I was getting the same problem about 2 months ago for me. First, copy your data to a different storage place, such as USB memory stick. I had to buy a new hard disk because my was failing. It would'nt even boot up at the very end. I had to take it in to a hardware store where to got me a new HD. There could able to ghost by data over, but still it leaves you a bit shaky.
 

WayneRyan

AWF VIP
Local time
Today, 22:46
Joined
Nov 19, 2002
Messages
7,122
aman,

You code is fine, but I wouldn't panic about the disk drive yet.

1st - Back up your database

2nd - Try to Compact/Repair

3rd - Create a new blank database and import everything into it.

Wayne
 

Users who are viewing this thread

Top Bottom