Application-defined or object defined error

Bilal

Registered User.
Local time
Today, 00:05
Joined
Sep 30, 2013
Messages
64
Ive been having this problem for a few hours now, i cant seem to figure out what the problem or where the problem is for that matter. after the error comes up the form automatically opens up and access takes me out of the VBA section, its really frustrating and i would really apreciate it if somebody could help me.
 
Okay a bit more information might be handy,

  • At what point did this error occur? When opening the file/Adding a new form?
  • What did you do different since the application worked without any error?
  • Have you tried Compact & Repair?
  • Did you try Compiling the Code for any un handled exception/compiler error?
 
  • At what point did this error occur? When opening the file/Adding a new form?
    the error occurs towards the end of the open form sub

  • What did you do different since the application worked without any error?
    i havnt done anything different to my form, i was convinced that after i done my form my vba was going to be riddled with errors, so im fixing that now

  • Have you tried Compact & Repair?
    just done that now, didnt work :(

  • Did you try Compiling the Code for any un handled exception/compiler error?
    fairly new to access, dont really understand what you mean here

ive got a form that i am building atm, i may have also posted this elsewhere, however if you see the screenshot i have took..
the main form is working fine, its the subform that is being a pain i cant get it to connect with the main form, it should be fetching the data from another table for each supplier. people have told me to 'link child fields' or link master fields' in property sheet however an error comes up saying 'cannot build a link between unbound forms'
 

Attachments

To compile to Code, go to the VBA window, on the menu bar there is a menu called Debug under that there should be an option Compile.

The screen shot you have shown, denotes that another error occurs while the error handler is busy trying to handle the error caused somewhere else. It could be anywhere/any of the methods, FindPosition, cdePopulate, ClearTheScreen, DoButtons.

Do you normally handle errors for every sub/function? If not Step through your code..

attachment.php


...however an error comes up saying 'cannot build a link between unbound forms'
Well this error is True in most sense, but at the same time is not entirely True.. You can build Links between the Master and Child, just have to be manual.. It cannot be done with the Wizard.
 
yup i step through my code and i press the compiledatabase9, i also start by placing a breakpoint on the open form sub and i run down through the code, if its possible i can send you my database through email or something, dont want to put it here and you could explain my mistakes or just merely comment the lines that have bugs or need fixing? and how do i manually build the links
 
Well this error is True in most sense, but at the same time is not entirely True.. You can build Links between the Master and Child, just have to be manual.. It cannot be done with the Wizard.
here is the stripped version of my database, its the suppliers form and suppliers vba code that i am currently having trouble with, but if you could make any other amendments that would be splendid, can you point out the bits that i have missed or made the mistake on because i have been playing around for about half a day so it would be really good to know what the problem was so it dont happen again
 

Attachments

What exactly does this LOC do?
Code:
Forms!frmSupplier![sfrmPerson].Form.MasterUpdated
 
im not 100% sure as i lifted the code, lol and i dont want to make any assumptions as to what it may be in fear of making myself look more stupid than i already am :(. maybe something that links the two forms together?
 
If you delete all those lines of code from the frmSupplier, your code seems to run properly.
 
or did you mean the whole Forms!frmSupplier![sfrmPerson].Form.MasterUpdated business
 

Users who are viewing this thread

Back
Top Bottom