?
Solved

Expected user-defined type, not project

Posted on 2005-04-13
10
Medium Priority
?
736 Views
Last Modified: 2012-08-13
Hello,
 I get this error in my form on_load event "The expression On Load you entered as the event property setting produced the following error:Expected user-defined type, not project"

I don't remember this happening last night, so i don't know what I changed.  This error even happens when I comment out the whole form's onload event.

Please help.

Whatever.
0
Comment
Question by:whatever080697
  • 4
  • 3
  • 3
10 Comments
 
LVL 18

Accepted Solution

by:
Billystyx earned 126 total points
ID: 13770168
Not sure if this is it, but when you go to the form properties in design view, do you see an event procedure next to the load event in properties?
If not, copy your code out of the onload event, and delete it all and then go through the property inspector click on the drop down box next to load event and select code editor and then paste your code back in there.

Billystyx
0
 
LVL 34

Assisted Solution

by:flavo
flavo earned 124 total points
ID: 13770179
hmm.. if there is NO code there (all commented out) i'd say its corupt.  

Try to do a compile (in VBE debug-> compile)
try deleteing all the code from the form_load (copy it into word of something??) and compile.. then put it back
if that doesnt work...
if that doesnt work....
Try importing all objects into a new access container.
0
 

Author Comment

by:whatever080697
ID: 13770215
I figured out the problem. I used a variable name that must have been a reserved word.  rsReservations must be reserverd.  

This is not either of  your propsed sollutions so how should I handle this??

whatever
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 34

Expert Comment

by:flavo
ID: 13770217
rsReservations -> reserved word??? I dont think so....

Maybe you declared it wrong??
0
 

Author Comment

by:whatever080697
ID: 13770233
This line causes the error

Dim rsReservations As ADODB
0
 
LVL 34

Expert Comment

by:flavo
ID: 13770237
Dim rsReservations As ADODB.Recordset
0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13770239
what did you actually do to get it back on track?
(I agree with flavo here - rsReservations is not a reserved word)
Billystyx
0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13770242
that'd be it, good work flavo:)

Billystyx
0
 

Author Comment

by:whatever080697
ID: 13770265
Ok. I was wrong again! :-)

I needed to declare it as ADODB.Recordset.

Stupid error.

0
 
LVL 34

Expert Comment

by:flavo
ID: 13770270
Glad to help mate!

Good luck with the rest of your project

Dave :-)
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

807 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