Like Conditional Formatting

S

Stephen

I have a continuous form that lists a lot of records on it. I am wondering
if there is a way of showing a button on each record that meets a specific
criteria.

The form shows Quotations done by sales reps, when a quote has been given
the go ahead the Quotation number is entered. On this form I want the button
to show up on those records where the Quote number has been entered.

Any assistance would be appreciated.

TIA
 
L

Larry Linson

The key thing to remember is that there is only one design of the continuous
forms view, and all the others are just painted on the screen and can differ
only if they are bound to a data field. A command button, by definition,
cannot be bound to a data field, so whatever you set/do to the command
button for the current record will be reflected in the command button in all
visible records.

For some exceptions and workarounds, see MVP Stephen Lebans' site,
http://www.lebans.com.

Larry Linson
Microsoft Access MVP
 
S

Stephen Lebans

Great name... but bad GUI!<grin>
The accepted GUI practice for this issue is to have the Button shown on
every row and simply Disable the control for the rows where it is not
required. You can use ConditionalFormatting to Enable/Disable on a row
by row basis.

If you absolutely must go with your original design then you can
simulate the effect again with CF. There's sample code here showing you
how:
http://www.lebans.com/conditionalformatting.htm

--

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

DanK

YES!

OnExit of the quote number control, enter the following
(with proper referencing since I don't know the names of
your controls)

If Not IsNull(Me![QuoteNumber]) then Me!
[ButtonName].Visible = -1 Else Me![ButtonName].Visible = 0

Now, set the Visible property of the button to No.

You'll probably notice that ALL of the buttons appear and
disappear in all records when you exit the quote number
control. That, I'm not sure how to get around.

Another possibility is to have the button in the header of
the datasheet. It's also possible to SET the CAPTION
property to different things based on what was entered.
You can also control what COLOR the CAPTION text is
diplayed in based on different entries. It's pretty cool
to use all this stuff. It really helps the user interpret
all the data they're faced with on a form.

email me if you need to.
 

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