Hi
How to Write macro for a button, that Change Yes/No in a form?
Hi
How to Write macro for a button, that Change Yes/No in a form?
Why?
Why not bind Checkbox or Toggle button to Yes/No field?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Tha button is sending a email. I need to report that tha mail send by Yes/No.
Explore the SetValue method in macro. In macro designer, click the ShowAllActions ribbon button.
I don't use macros. In VBA, like:
Me!yourfieldname = True
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You could have a toggle button or checkbox that will indicate whether an email is sent. If the value is -1 (which corresponds to a check) then send the email, else if the value is 0 (unchecked) email is not sent.
But, why do you need a Yes/No for sending an email..? What else will this button be doing? If the button is only sending an email you place a line of code behind the button so that when clicked an email is sent, I see no need for to toggle Yes/No.
I have to update the data, those who send mail.
Did you attempt code as suggested? Is this resolved?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Still kind of confused by what exactly you are trying to accomplish.
You have a button to send an email, and when it is sent you want a field to contain 'Yes', and if it hasn't been sent, or failed to send you want the field to contain 'No' ,is this what you are going for?
no it didnt work
What does that mean, what happened - error message, wrong results, nothing? What exactly did you try? Post code for analysis.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
This is mush more dene i need.
I need that the field to contain Yes after the button.
I tried several ways:
me!fieldname = True
me![fieldname] = True
as a sub macro
Did you use your actual field name?
You mean a VBA Sub procedure? In what event?
Macros are very different from VBA.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.