A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Issue with the Lebans "Justify" module



 
 
Thread Tools Display Modes
  #1  
Old March 1st, 2008, 03:06 PM posted to microsoft.public.access.forms
Bob Howard
external usenet poster
 
Posts: 71
Default Issue with the Lebans "Justify" module

I'm trying to use Stephen Lebans' "Justify" module in an A2K3 program
running under A2K7 Runtime under Vista. The program has been working fine
for a couple of years when simply running under A2K3 ... but now I'm just
trying to get it working under A2K7 Runtime and am having a problem.

I'm right-justifying a column in a listbox that's in a subform.

It all works OK for a while, but I get several A2K7 error messages when my
VBA code issues a requery for the listbox's controlsource (which points to a
query containing the function call to the Lebans code).

Anyone having issues with this code??

bob


  #2  
Old March 1st, 2008, 03:44 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Issue with the Lebans "Justify" module

I know for a fact that Stephen hasn't done any work to ensure that his
projects work with Access 2007. It would help considerably to get the exact
error messages.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Bob Howard" wrote in message
...
I'm trying to use Stephen Lebans' "Justify" module in an A2K3 program
running under A2K7 Runtime under Vista. The program has been working fine
for a couple of years when simply running under A2K3 ... but now I'm just
trying to get it working under A2K7 Runtime and am having a problem.

I'm right-justifying a column in a listbox that's in a subform.

It all works OK for a while, but I get several A2K7 error messages when my
VBA code issues a requery for the listbox's controlsource (which points to
a query containing the function call to the Lebans code).

Anyone having issues with this code??

bob


  #3  
Old March 1st, 2008, 05:05 PM posted to microsoft.public.access.forms
Stephen Lebans
external usenet poster
 
Posts: 619
Default Issue with the Lebans "Justify" module

Doug's right, I've got to get A2007 installed here some time soon.
I would suggest you remove the ListBox control source reference to my UDF
and bind it to a query/table. Does it still fail when your code Requeries
the ListBox?


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Bob Howard" wrote in message
...
I'm trying to use Stephen Lebans' "Justify" module in an A2K3 program
running under A2K7 Runtime under Vista. The program has been working fine
for a couple of years when simply running under A2K3 ... but now I'm just
trying to get it working under A2K7 Runtime and am having a problem.

I'm right-justifying a column in a listbox that's in a subform.

It all works OK for a while, but I get several A2K7 error messages when my
VBA code issues a requery for the listbox's controlsource (which points to
a query containing the function call to the Lebans code).

Anyone having issues with this code??

bob



  #4  
Old March 1st, 2008, 10:57 PM posted to microsoft.public.access.forms
Bob Howard
external usenet poster
 
Posts: 71
Default Issue with the Lebans "Justify" module


"Stephen Lebans"
wrote in message ...
Doug's right, I've got to get A2007 installed here some time soon.
I would suggest you remove the ListBox control source reference to my UDF
and bind it to a query/table. Does it still fail when your code Requeries
the ListBox?


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Bob Howard" wrote in message
...
I'm trying to use Stephen Lebans' "Justify" module in an A2K3 program
running under A2K7 Runtime under Vista. The program has been working
fine for a couple of years when simply running under A2K3 ... but now I'm
just trying to get it working under A2K7 Runtime and am having a problem.

I'm right-justifying a column in a listbox that's in a subform.

It all works OK for a while, but I get several A2K7 error messages when
my VBA code issues a requery for the listbox's controlsource (which
points to a query containing the function call to the Lebans code).

Anyone having issues with this code??

bob




Stephen,

I'll get back here with additional shortly ...

Meanwhile: had you considered downloading the free A2K7 Runtime and testing
your code in a program written to A2K and A2K2 and A2K3 (or whatever) under
control of the Runtime. By going back and forth a bit (which is what I'm
doing since I don't own "full" A2K7 either), I'm able to see how changes I
make to my program operate (or fail, as it were) under A2K7 and then make
appropriate modifications.

MS does not seem to maintain A2K7 Runtime ... so I'm supposin' anything that
will work under the Runtime will probably work under the full access.

bob


  #5  
Old March 2nd, 2008, 02:47 AM posted to microsoft.public.access.forms
Stephen Lebans
external usenet poster
 
Posts: 619
Default Issue with the Lebans "Justify" module

Bob I am a Microsoft MVP so I have a copy here of A2007. I just was not
interested in working with A2007 until the major bugs were corrected by a
Service Release update. Perhaps I will install it on one of my laptops that
I just use to browse the Net and check Email..

--

Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

bob




Stephen,

I'll get back here with additional shortly ...

Meanwhile: had you considered downloading the free A2K7 Runtime and
testing your code in a program written to A2K and A2K2 and A2K3 (or
whatever) under control of the Runtime. By going back and forth a bit
(which is what I'm doing since I don't own "full" A2K7 either), I'm able
to see how changes I make to my program operate (or fail, as it were)
under A2K7 and then make appropriate modifications.

MS does not seem to maintain A2K7 Runtime ... so I'm supposin' anything
that will work under the Runtime will probably work under the full access.

bob



  #6  
Old March 2nd, 2008, 05:59 AM posted to microsoft.public.access.forms
Bob Howard
external usenet poster
 
Posts: 71
Default Issue with the Lebans "Justify" module


"Bob Howard" wrote in message
...
I'm trying to use Stephen Lebans' "Justify" module in an A2K3 program
running under A2K7 Runtime under Vista. The program has been working fine
for a couple of years when simply running under A2K3 ... but now I'm just
trying to get it working under A2K7 Runtime and am having a problem.

I'm right-justifying a column in a listbox that's in a subform.

It all works OK for a while, but I get several A2K7 error messages when my
VBA code issues a requery for the listbox's controlsource (which points to
a query containing the function call to the Lebans code).

Anyone having issues with this code??

bob


I found the problem and implemented a work-around ... not the best, but it's
at least working.

The error I was getting was "You entered an expression that has an invalid
reference to the property Form/Report"

The "justified" column in the listbox (unbound --- used for reference and
navigation purposes only) appeared properly on the screen ... the problem
only occurs when I requery the listbox while in dataentry mode and while
pointing to the "empty" record that you get when in that mode (before
anything is moved to any of that records fields so it's perhaps only a
placeholder).

Here's the situation:

The problems were caused by a difference in how Access 2007 handles bound
forms that have their DataEntry property set to "True".

After my user enters some data, they click a button which takes them to a
"Save" routine (VBA). In that routine, I issue a command to move to the
"empty" record ... thus saving the record just entered. I then need to get
things ready for the user to enter the next record.

I have an unbound listbox control on the form, and the query behind the
rowsource is what contains the "justify" stuff. As part of my getting ready
for the next record, I need to requery that listbox. Of course, the
"justify" info, which is in one of the columns of that query, also refers to
that listbox.

Here's where the Access 2007 difference comes into play. When the
recordsource is pointing to the "empty" record, it appears that controls on
this form (* see below --- this is actually a sub-form) cannot be
referenced! My only recourse is to set dataentry to false for a moment,
requery the listbox, and then set dataentry back to true again. It's a bit
deeper than this, but wrapping my setup routine with code to exit dataentry
mode PLUS temporarily disabling my error handler (i.e., Resume Next for a
few lines of code) did the trick.

The overall form is actually a main form that's not in dataentry mode, a
subform that is in dataentry mode, and that subform has a subform. The
"Save" button is in the middle one (the subform below the main form) and the
listbox is in the bottom one (the subform of the subform). That bottom one
is not a dataentry form ... just the one in the middle.

The prior code worked fine when this was an Access 2000 database / program,
and continued to work fine when I converted everything to Access 2003. But
running the Access 2003 program under Access 2007 runtime made this error
come to the surface.

So I've gotten around it ... although I'm not particularly fond of it...

bob


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.