|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
The object isn't open??
I am beginning to crack a problem I have been having...
I have a form which is used as an identifying docket once printed. The infomation given to this form is to be taken from a data inputing form of which the users use! When the Identifying docket is to be loaded an error message saying "The object isn't open" comes up and also identifys the record number of the form (Users Form) so the VB code can see what it is looking at, however this error pops up. How can I ensure the data is logged into the table prior to the module running, or how can I ensure that the object is refreshed or re-loaded???? Please help, getting very frustrated!! |
|
#2
|
||||
|
||||
|
can you post some of your calling code so we can get a better idea?
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#3
|
|||
|
|||
|
Re: The object isn't open??
Quote:
Yes Fisherman, below:- Function Print_View_Ident_scrap_docket() Dim vari Dim IDselect IDselect = [Forms]![NCR Report3]![ID] 'DoCmd.Close acForm, "NCR Report3" 'DoCmd.OpenForm "NCR Report3", acNormal, "", "", , acNormal 'DoCmd.RepaintObject acForm, "NCR Report3" ' Attempt DoCmd.OpenForm "Scrap Indent Docket", acNormal, "", IDselect, , acNormal DoCmd.GoToRecord , IDselect 'DoCmd.PrintOut "Scrap Indent Docket", IDselect 'DoCmd.Close acForm, "NCR Report3" 'DoCmd.Maximize 'Beep vari = MsgBox("Place defective Item and NCR Docket on you're relevant quarantine area - OK to continue" _ , vbOKCancel + vbDefaultButton1 + vbInformation, "Deficiency Entered") If vari = (2) Then DoCmd.OpenForm "NCR Reporting2", acNormal, "", "", , acNormal DoCmd.Close acForm, "Scrap Indent Docket" Else DoCmd.PrintOut acPrintAll, , , acHigh, 1, True DoCmd.OpenForm "NCR Reporting2", acNormal, "", "", , acNormal DoCmd.Close acForm, "Scrap Indent Docket" End If End Function |
|
#4
|
|||
|
|||
|
What is the "Docmd"??
|
|
#5
|
|||
|
|||
|
DoCmd, The VBA code name in acces to preform a function. For example DoCmd open....open form etc
Is that what you want to know? |
|
#6
|
||||
|
||||
|
CP - DoCmd in an Access keyword in VBA and access objects in VB. It allows you most of the functionality of the menu options...
Tal - can you tell me where it is blowing up? What part of the code is it getting to before it crashes? |
|
#7
|
|||
|
|||
|
THx for your expain!..
|
|
#8
|
|||
|
|||
|
Fisherman
Sorry for the delay. To be honest, I am not totaly sure. The code see's the IDselect number but says it is not open |
|
#9
|
||||
|
||||
|
I wonder, what is the value of opening closing the report before you are opening it?
|
|
#10
|
|||
|
|||
|
Sorry mate, I don't understand?
|
|
#11
|
||||
|
||||
|
Nevermind.. I just reread and see where it is commented out... Interesting, when I read your post and saw the word "mate", I immediately started thinking in an Australian accent.
![]() That's very strange indeed. I can't figure out where it would be blowing up... if you breakpoint the code, does it stop running at any particular point? |
|
#12
|
|||
|
|||
|
It's hard to say, for some reason I can't debug the code.
It's as if Access cannot see the entry, say's it is not open, but it is..I'm looking at it. The database table are split from the front view, would that have an effect. Being a network DB maybe there is a timing issue??? If so, would it help if I bring the database back together? |
|
#13
|
|||
|
|||
|
You may need to open one of the forms as Modal. The way it is now your vb code begins to open the first form then moves right along to the second form without waiting for the first form to close.
Just guessing |
|
#14
|
|||
|
|||
|
Cheers, as I am new to VB how do you script that? Opening a form in modal??
|
|
#15
|
|||
|
|||
|
It appears you are working with VBA in an Access database. Open the Access Help and put "modal" in the answer wizard box (without the quotes) to get help on using modal forms.
|