Application-defined or object defined error (1 Viewer)

Bilal

Registered User.
Local time
Today, 13:30
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.
 

pr2-eugin

Super Moderator
Local time
Today, 13:30
Joined
Nov 30, 2011
Messages
8,494
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?
 

Bilal

Registered User.
Local time
Today, 13:30
Joined
Sep 30, 2013
Messages
64
  • 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

  • code.zip
    134.6 KB · Views: 167
  • sceenshot of form.zip
    177.4 KB · Views: 183

pr2-eugin

Super Moderator
Local time
Today, 13:30
Joined
Nov 30, 2011
Messages
8,494
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..



...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.
 

Bilal

Registered User.
Local time
Today, 13:30
Joined
Sep 30, 2013
Messages
64
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
 

Bilal

Registered User.
Local time
Today, 13:30
Joined
Sep 30, 2013
Messages
64
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

  • Database Stripped.zip
    226.9 KB · Views: 146

pr2-eugin

Super Moderator
Local time
Today, 13:30
Joined
Nov 30, 2011
Messages
8,494
What exactly does this LOC do?
Code:
Forms!frmSupplier![sfrmPerson].Form.MasterUpdated
 

Bilal

Registered User.
Local time
Today, 13:30
Joined
Sep 30, 2013
Messages
64
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?
 

pr2-eugin

Super Moderator
Local time
Today, 13:30
Joined
Nov 30, 2011
Messages
8,494
If you delete all those lines of code from the frmSupplier, your code seems to run properly.
 

Bilal

Registered User.
Local time
Today, 13:30
Joined
Sep 30, 2013
Messages
64
or did you mean the whole Forms!frmSupplier![sfrmPerson].Form.MasterUpdated business
 

pr2-eugin

Super Moderator
Local time
Today, 13:30
Joined
Nov 30, 2011
Messages
8,494
No not all the code.. Just that line, it appears in the VBA code several times..
 

Attachments

  • EDITED - Stripped.accdb
    888 KB · Views: 206

Users who are viewing this thread

Top Bottom