469,602 Members | 1,727 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Disable Print Button

I have a Form that has a query and in the "Split Form" Default View that can be edited the main table. I am selecting the values that I want to include in printing using Checkbox. If you save it and close the form, the selected values will not show if ever the form will be opened again. I want to disable the print button if there is no values on the "Split Form Datasheet" so that the user won't be able to print it again because on the print view it will show again the selected values. I want to restrict the reprinting it twice. I read and research about this but all of the codes are not applicable. Thank you in advance for those who can help me.
Oct 26 '21 #1
2 6237
NeoPa
32,200 Expert Mod 16PB
Hi Darius.

First - Welcome to Bytes.com.

I have to admit to being quite confused. You use the word "It" many times in your explanation, but unfortunately it really isn't clear in most cases what the "It" refers to.

Perhaps you could edit your original post to explain your situation a little more clearly.

I'm sure once the question is clear there will be many who'd like to help you.
Oct 26 '21 #2
GazMathias
224 Expert 128KB
Hi Darius9023,

Unfortunately, you have not painted a very clear picture. I can guess what you are trying to achieve though.

Do your records have a printed flag?

If they do then whatever routine is actually responsible printing should be amended to respond to that flag:

This is kinda how I would do it:

>>PrintButton.Click
For rows
Store ID in array / delimited string for checked rows.

If IDs
Call print management function, passing IDs
Query rows in ID list where printed = false (I would use GetRows for this).
When not EOF
For rows
Print
Update printed flag.

Alternatively, rework that slightly to update all printed rows when printing has finished, if it gets locky.

If I'm barking up the wrong tree then you should post the content of your print click event so we have a better idea about what's going on in your solution.

Gaz
4 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by blarfoc | last post: by
6 posts views Thread by jack-e | last post: by
16 posts views Thread by Barry Gilmore | last post: by
8 posts views Thread by GS | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.