Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Dec 2007
    Posts
    19

    Unanswered: Database variable error

    Hi everyone-

    This is my first posting on this forum. I have a database that I generated several years ago in an earlier version of Microsoft access and when I open it in Access 2003 and try to run a report (Items by room) I get an error that doesn't allow me to proceed. I have taken a look at it and I cannot figure what is wrong. Any help on fixing this problem is greatly appreciated. Attached please find a copy of the database in question. Thank you very much.

    Manuel A. Ayala
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hi manuel,
    can you post the error message you are getting?

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Dec 2007
    Posts
    19
    izyrider

    The message is as follows:

    "You entered an expression that has an invalid reference to the property Visible. The property may not exist or may not apply to the object you specified. "

    Thanks.

    Manuel

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hmmmm
    i had some standard answers ready for the standard errors.
    this one is new for me - i'll have a look at your db

    back in a while.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    interesting!

    looking some more.

    izy
    Attached Thumbnails Attached Thumbnails fai.GIF  
    currently using SS 2008R2

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    you have some strange stuff in that zip that will not compile.

    i made the following mods and it compiles: please mirror equivalent mods and see if you still get an error:

    Code:
    Public Sub ShowEvent(xxEvent As String)
    ' Accepts: a text value, the type or name of an object and the name of an event
    ' Purpose: displays an event history list in the Event History form
        
        If IsNull(Forms![Event History]![History]) Then
            Forms![Event History]![History] = xxEvent
        Else
            Forms![Event History]![History] = xxEvent & Chr(13) & Chr(10) & Forms![Event History]![History]
        End If
    
    End Sub
    sorry that i'm still scared to run your code.
    it's bedtime for me and i don't have the time to go thru every line right now.
    let us know if above doesn't fix it & i will look again over the weekend if nobody else comes to the rescue.

    ...and by the way - it is not obvious HOW to run your app - no startup form, no obvious frmStartWithMe

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Dec 2007
    Posts
    19
    izyrider

    This database is intended to be used internally. Users will run a routine that will extract AutoCAD (computer aided drafting software) data and dump it into an access table and then they go the report section and run the type of furniture report that they want. Thanks for all your assistance.

    Manuel

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ok my friend - you are of course free to design your user interfaces anyway you like.
    from my point of view, i will not run your code on my machine until i understand what it is trying to do - if i don't know where it is supposed to start it makes the problem rather more difficult than i really want.



    getting back to your error msg: your original code simply DOES NOT COMPILE (translation - is fatally wrong).

    do let us know if you get error messages after you have fixed the ShowEvent routine.

    goodnight - izy
    currently using SS 2008R2

  9. #9
    Join Date
    Dec 2007
    Posts
    19
    Izyrider

    I made the changes you suggested and I am still getting the error message. Thanks.

    Manuel

  10. #10
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    As Izy pointed out, one of the problems seems to stem from this...

    Public Sub ShowEvent(Event As String)
    ' Accepts: a text value, the type or name of an object and the name of an event
    ' Purpose: displays an event history list in the Event History form

    If IsNull(Forms![Event History]![History]) Then
    Forms![Event History]![History] = Event
    Else
    Forms![Event History]![History] = Event & Chr(13) & Chr(10) & Forms![Event History]![History]
    End If

    End Sub

    I changed it to this...

    Function ShowEvent(xxEvent As String) <- I put Function here and as Izy suggested, changed Event to xxEvent.
    ' Accepts: a text value, the type or name of an object and the name of an event
    ' Purpose: displays an event history list in the Event History form

    If IsNull(Forms![Event History]![History]) Then
    Forms![Event History]![History] = xxEvent
    Else
    Forms![Event History]![History] = xxEvent & Chr(13) & Chr(10) & Forms![Event History]![History]
    End If

    End Sub

    I was then able to compile and run your report without errors (other the reference error in the fields in the header to the form Items by Room) but the report opened ok and the db compiled without errors.

    I think using the keyword "Event" is one of the main issues. You may also want to check the db for other keywords which may be utilized.
    Last edited by pkstormy; 12-07-07 at 11:59.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  11. #11
    Join Date
    Dec 2007
    Posts
    19
    Paul-

    I made the modifications you suggested and was able to compile it. I am, however, not able to run the Items by room report because I am getting the an error that I am not quite sure how to correct. And, if I click the OK button, I get an "Action failed" dialog box and no report is displayed. Thanks for you help.

    Manuel

  12. #12
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    What is the error you get and do you get it after you click the button? The items by room report opened fine for me so I'm wondering if there isn't something else going on.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  13. #13
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    Manuel,
    i got thru reading your code and is doesn't pose a threat to my machine - i ran your report with and WITHOUT the ShowEvent() fix we already discussed..

    no errors ! ! ! ! (except the #error in the report ....see .GIF)

    so what's up with your instance?
    references ok? (Alt-F11 Tools/Referencs & look for broken/missing
    error mode ok? (Alt-F11 Tools/Options/General ...break on unhandled

    can you think of any additional info to provide?????

    izy
    Attached Thumbnails Attached Thumbnails 0errors.GIF  
    currently using SS 2008R2

  14. #14
    Join Date
    Dec 2007
    Posts
    19
    Izy

    Can you please send me a copy of the modified database. Maybe, it is just me but I cannot get it pop up a report. Are there any security settings that I should take a look at may be causing the problem? I really appreciate your help.

    Manuel

  15. #15
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    Manuel,

    there's the problem - i get ZERO runtime errors running that report direct from your ZIP (no extract, no modification, just exactly as you posted it)
    the .mdb has compile errors as we have discussed, but that report runs fine despite the compile issue.

    do you have the form open when you try to run the report??????

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •