Microsoft Access VBA #8 | Message Box Options part 1 - YouTube

Channel: 馃吅馃叞馃吋馃叞馃唸馃吘 馃叞馃吅馃吘

[15]
now i will show you the two message box option聽 in access message box is a statement and function聽聽
[29]
okay now i will show you the difference of this聽 two option let's start first i will create form
[43]
then i will save to message box
[51]
options
[55]
then i will go to design and i will聽 put button to execute our message box
[68]
so here
[71]
i will make a hello world
[80]
so i will choose to save this hello
[88]
now i will show you the message box statement
[94]
so mrs baxter's statement this is useful but聽 just only two passing messages to the user聽聽
[102]
without any interruption this is simple again i聽 will select this one one click and i will type
[131]
i'll type message box then since this is just聽 only a message box statement i will put here hello
[148]
world
[168]
this this is a simple this is the聽 so-called again the message box聽聽
[174]
statement next i will show you聽 also the message box function
[187]
again i will go to design then
[191]
i will add another button
[202]
right but that's only an action then here cmd
[209]
action
[215]
then go to event then unclick
[220]
here now we need to put some variable聽 so let's put them x as integer
[239]
then x equals now we will put our message box here
[250]
we search box then we'll聽 put our function to prompt
[260]
we put are you sure you want
[278]
next we'll choose the button types聽 there's a lot of option here to choose
[292]
but for this sample i will聽 choose bv yes no meaning聽聽
[304]
this button types it will generate us the two聽 buttons or options which is yes or no then comma
[321]
next is the title of the聽 message box so i will drop
[330]
double quote then
[335]
you can put any title so which i import processing
[343]
then i will put some then聽 i will close our function
[356]
so here this is the message box聽 statement without any interruption聽聽
[363]
just only to pass a message into the user聽 if you click that button here you have
[375]
an option to choose so this is our function聽聽
[383]
then this is the button types and this is the聽 title so if we will click the button automatically聽聽
[392]
it will ask are you sure you want to proceed then聽 we have some option to click yes or no button
[405]
look here it's only okay and聽 here if you click this one聽聽
[412]
it will generate two buttons which is聽 yes or no then you can do some action
[426]
no then you can just also yes so聽 you have an option to interact
[433]
okay next we will add another button聽聽
[442]
i will show you also the another聽 example of the message box function
[457]
here
[461]
i will just put should do because this is聽 almost related with here because this is a
[472]
message box function i will proceed聽 in the action tool then click event
[491]
here i will put
[496]
our variables dim result please sort as in teacher
[509]
then again we'll put our variable here result聽 equal in our message message box then open bracket聽聽
[524]
next our function so i will put
[530]
are you sure
[536]
then we'll put again the button type
[544]
so i will choose first the
[550]
vb okay
[556]
so again this will generate the two buttons聽 okay and cancel for us to choose then
[573]
i will put title which is confirmation聽 on formation this will be an example
[589]
then we will close then i聽 will put here debug that print
[614]
result so again this is our function this is our聽 variable then once we click our button it will聽聽
[627]
ask are you sure then it gave us two聽 options to cancel okay or concern
[642]
look are you sure so it's coming聽 here it's including vba or cancel聽聽
[653]
so we need to modify that one the issue here is
[662]
we need to put
[665]
double quote to separate and here also
[673]
now everything is fine
[677]
then again if we click that one聽聽
[681]
are you sure then you can select cancel or you聽 can select question okay before here is yes or no
[696]
then another option with the same button we can聽 add also here we will change the button type
[711]
we can choose also the vb about ignore so meaning
[718]
this vb about retry ignore this will聽 give us or generate three buttons okay聽聽
[730]
if i open then right click look are聽 you sure so we have three options about聽聽
[741]
retry and ignore as you notice here the default is聽 abort so whatever you if we choose the button type聽聽
[754]
the first button this is the default upboard retry聽 and ignore so we need to choose which button are聽聽
[768]
default so let's say ignore we can make a default聽 also or retry okay now i will close that one here
[784]
this one since this is our聽 button types so no need to聽聽
[792]
add comma but what we want to do is instead聽 of cover we just put a space then plus聽聽
[803]
now we can choose so since we have three buttons聽 this vbd port button one this is for a bird聽聽
[814]
and vb default button 2 this is for retry and if聽 we choose this one vb default button 3 so this one聽聽
[824]
will generate as our ignore is the default聽 so we will choose this one as our default
[834]
block
[838]
if we click this action 2聽聽
[841]
now our default is ignored before it's abort聽 so we will also replace to retry as our default
[854]
it's very straightforward just
[858]
three plus number two then if we click this聽 one automatically read triad is our default now聽聽
[873]
we need to put some symbol here so we need聽 to put some symbol like are you sure su聽聽
[881]
we will put or we will add the symbol聽 here like exclamation or critical symbol
[891]
okay
[894]
the same button in here again since we have聽 already we chose already this button type聽聽
[905]
now we need to add some symbol again you need to
[911]
put comma just press space then plus聽 now we will choose baby critical聽聽
[922]
exclamation information so we will聽 choose this one exclamation then
[934]
try lock
[938]
we this is the symbol to display are you sure聽 you can modify also we can choose another
[952]
symbol
[957]
again that's why i remove plus because聽 if we will click plus automatically聽聽
[964]
give us an option so no need to type so聽 baby critical this will give us a red x
[973]
critical
[979]
look are you sure then another
[987]
also instead of baby critical聽 you can choose also information
[998]
information not explanation聽 we've done already this one
[1005]
information this one vb information just聽 to show to the user the option knock聽聽
[1018]
are you sure so we have three buttons to聽 execute again this is the sample of missions box聽聽
[1033]
statement and this one this is the message聽 box function so we have two examples for
[1044]
message box
[1048]
thank you and god bless
[1073]
you