'Macro' Substitution of Variables

D

Dr. Know

david epsom dot com dot au said:
SELECT application.CurrentDb.properties("fred") AS Expr1,
tbl__All.strAll FROM tbl__All;


If I want global variables visible in SQL, I can add them
to the database properties, or I can put them into a table
(either as a row or column item).

This is an interesting technique that I haven't seen before.
I can tell I've got a whole LOT of reading to do - again... ;-)

I hate to think of the semi-useless knowledge I have aquired in the
past 20 years as concerns programming languages...

Thanks,
Greg







Dr. Know
 
D

Dr. Know

Albert D. Kallal said:
Not sure what/how you are tying to do things, but perhaps you are not using
the right control for the right job? Take a look at the following screen
shots to get some ideas for displaying data as a grid. Once you get the hang
of what control to use, then you will realize how lame the "browse" command
used in the x-base variants of yester years was....


Thanks for all your input. I found some interesting ideas in there.

As for the highlighted row question...
I have a continuous form based on a table of ~35,000 records.
I simply wanted to highlight the current row of the continuous form so
that the user would easily discern where he/she was at in the listing
- by highlighting the active record. Similar to what a listbox does.

But I'm not about to load up a listbox with all that info - over a
network no less...

Apparently it is a common request, as Lebans<sp?> has several
conditional formatting modules for this purpose. Unfortunately, they
don't work to my satisfaction. The update time and screen flicker was
unacceptable on these record sets. It's something that really needs
to be integrated into the ACCESS display routines to work properly.
It an amazing omission!

Thanks again,
Greg








Dr. Know
 
A

Albert D. Kallal

As for the highlighted row question...
I have a continuous form based on a table of ~35,000 records.

The above sounds like a very bad design. You should not be sending that many
records to the form. You need to restrict the records BEFORE you load the
form. It would be silly for a instant teller machine to download ALL names
and THEN ASK you for your account number. You wasted all that
processing and precious bandthwith BEFORE you done anything useful or
even figured out what the user wants!.

While computers are 100 of times faster then they were 10 years ago,
unfortunately, the network speed has not increased at all. (some
companies are going with 1 gig abit lans, but for the most part
network speed has not increased).

You want to restrict the number of records loading into that form BEFORE you
LOAD and display. It is silly to assume that a user needs that many records.
Spend some time setting up something to find out what the user wants
first..and THEN load the records
into the form, and then display.

You can check out some ideas on this concept at:

http://www.attcanada.net/~kallal.msn/Search/index.html
I simply wanted to highlight the current row of the continuous form so
that the user would easily discern where he/she was at in the listing

I never had the above to be a problem. Look at how many people use Excel, I
never seen users request, or have a problem in this area with regards to
excel (only the current box is highlighted in Excel). is likely the
most popular program in the world but we rarely see this highlight problem.

Further, just like in Excel those controls access forms ARE editable.
So, it further don't make sense to highlight the whole line. If all the
users of Excel around the world don't have a problem with this....I
can't imagine your users will also?

If you look at the above screen shoots...the first field is
highlighted...and my users have NEVER have a problem. Further, as mentioned,
if you provide some search means BEFORE you load the form, then you likely
can
also use a listbox.
It's something that really needs
to be integrated into the ACCESS display routines to work properly.
It an amazing omission!

Hum...nah..not really...the rest of the world is not complaining here!

I don't think this is a big issue at all. Ms-access has been around for ten
years now, and with the 30,000 posts here PER MONTH! in the access
newsgroups
the problem is VERY RARE! It would seem your problem is little, and you are
likely are
wasting too much time on a what is not really a problem.

For sure many people did request the ability of highlighting, or changing
the color of a box
in a continues form. Microsoft finally gave us this feature in a97 Many
workarounds from great folks like Stephan Lebans often were the only
solution BEFORE we got those features in ms-access.

We got conditional formatting in a2000.So, for the
last 3 versions of office we had some built features in terms of
highlighting
boxes, and formatting. However, having the current edit row highlighted is
a slight different problem then highlighting a box.

However, why not use the built in conditional formatting anyway?
It is not designed for what you want...but I don't believe there is a
flicker problem when you do this, and there is about 4 lines of code. (not
sure what you mean by "all that code").

I have used:

Application.Echo False
Me.Text6.ControlSource = "=([id] = " & Me.ID & ")"
DoEvents
Application.Echo True

I count 4 lines above. So, keep your first current text box on the
continues form, remove all tab stops for the other fields (that makes the
up/down arrow keys work with NO code). Make one text box (text6 in the above
the length of the width of the form, and place it behind all the fields).

Use the above code, you should not have any flicker..and 4 lines of code is
not that much. I have noticed with the above code that the database window
will flicker a bit,
but other forms/screens etc. are just fine and there is no flicker. Note
sure why the database windows flickers a bit...but then again it has been
years since my users EVER get to see the main database window anyway. Like
any good developer...I sure you hide the ms-access interface. (note that
hiding the ms-access interface can be done without ANY code).

So, if you must highlight each row..give the above a try.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top