Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old November 6th, 2003, 09:56 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!!

Reply With Quote
  #2  
Old November 6th, 2003, 11:13 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,171 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 37 sec
Reputation Power: 110
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
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

Reply With Quote
  #3  
Old November 7th, 2003, 01:47 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: The object isn't open??

Quote:
Originally posted by talcummalcolm
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!!


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

Reply With Quote
  #4  
Old November 7th, 2003, 04:57 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
What is the "Docmd"??

Reply With Quote
  #5  
Old November 7th, 2003, 06:02 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #6  
Old November 7th, 2003, 07:49 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,171 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 37 sec
Reputation Power: 110
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
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?

Reply With Quote
  #7  
Old November 7th, 2003, 10:13 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
THx for your expain!..

Reply With Quote
  #8  
Old November 10th, 2003, 06:04 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #9  
Old November 10th, 2003, 07:41 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,171 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 37 sec
Reputation Power: 110
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
I wonder, what is the value of opening closing the report before you are opening it?

Reply With Quote
  #10  
Old November 10th, 2003, 09:12 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry mate, I don't understand?

Reply With Quote
  #11  
Old November 10th, 2003, 09:24 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,171 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 37 sec
Reputation Power: 110
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
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?

Reply With Quote
  #12  
Old November 12th, 2003, 05:20 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #13  
Old November 12th, 2003, 08:42 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,717 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 40 m 34 sec
Reputation Power: 688
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

Reply With Quote
  #14  
Old November 13th, 2003, 08:50 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cheers, as I am new to VB how do you script that? Opening a form in modal??

Reply With Quote
  #15  
Old November 13th, 2003, 09:11 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,717 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 40 m 34 sec
Reputation Power: 688
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.

Reply With Quote