Subform procedure

bjackson

Registered User.
Local time
Today, 21:55
Joined
Jan 3, 2003
Messages
404
I am running a public sub procedure(named SetSearchColumnDetails) that resides in a subform (control name of SearchResults) on a mainform named Searchform.This procedure on my machine runs quite ok,but on another pc access give me an error complaining that the object either is not open or does not exist.It errors on the line
Forms![searchform]![SearchResults].Form.SetSearchColumnDetails.The form that is using this routine is open and does exist and when the debug window is closed it is open and visible

i know refering to subforms can be tricky, but why would the routine run on one pc o'k but spit out an error on the other machine.The references for the db's are the same on both pc's.

Does anybody have any suggestions
i am using access 2k
Regards
Bjackson
 
How are you using this procedure? (and what does it do for that matter)

If it sets a value, it is far better to set the value of a unbound textbox to a function that can evaluate the value for you or set the value via VBA code on one of the form's events.

You can then refer to the unbound text box with (probably) less hassle!
 
the procedure sets the column widths of the subform and hides or shows fields depending on what the search criteria is.It is fired when the main form has opened.

I dont understand why it works on 1 pc and not all pc's.The syntax for the subform is obviously correct or it would error on all pc's.The procedure works perfectly on my pc.
I was wondering whether its a access thing,as i am also having trouble with a control on another form-Me.JobId-access is complaning it doesnt exist either,but it does

Regards
Bjackson
 
I would check the references on the computers that don't play ball.
 
Well after a lot of wasted hrs it turns out the guy on the other end of the phone was stretching the truth a bit.His computer he assured me was up to date with all service packs and it must be my db that is corrupt.So i explained what i wanted him to try-namely importing all objects into a new db.When he attempted this the error "network connecting may have been lost" reared its head,so i guessed maybe he wasnt quite right.Sp1 was the last time any office updates were performed on his machine.

Now after running sp3 and jet sp8 all is well.
A lesson well learned-or maybe dont distrubute any dbs that are 400klm from base

Regards
Bjackson
 

Users who are viewing this thread

Back
Top Bottom