If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
form help
I am designing a database, after taken advice previously I have read up and
managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#2
|
|||
|
|||
form help
Open your form in design view and selecthe checkbox. Go to Properties - Data
and set Triple State to Yes. (Look up Triple State in the Help file). You can now use the checkbox to indicate yes, no or missing. To take appropriate action, add code to the AfterUpdate event of the checkbox. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#3
|
|||
|
|||
form help
I am fairly new to access and the use of codes,do you know the code which
will let me do this or were I'm likely to find one. Thanks "Steve" wrote: Open your form in design view and selecthe checkbox. Go to Properties - Data and set Triple State to Yes. (Look up Triple State in the Help file). You can now use the checkbox to indicate yes, no or missing. To take appropriate action, add code to the AfterUpdate event of the checkbox. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#5
|
|||
|
|||
form help
Sorry to appear total thick but what is code to do something is this
where I make up the code to goto the other form? Thanks for your patience "Steve" wrote: Add the following code to the AftrUpdate event of your checkbox: Select Case Me!NameOfYourCheckbox.Value Case True Code to do something Case False Code to do something Case Else Code to do something End Select The code under Case True will run when you check the checkbox. The code under Case False will run when you uncheck the checkbox. The code under Case Else will run when you first click on the checkbox when it is not checked. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message news I am fairly new to access and the use of codes,do you know the code which will let me do this or were I'm likely to find one. Thanks "Steve" wrote: Open your form in design view and selecthe checkbox. Go to Properties - Data and set Triple State to Yes. (Look up Triple State in the Help file). You can now use the checkbox to indicate yes, no or missing. To take appropriate action, add code to the AfterUpdate event of the checkbox. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#6
|
|||
|
|||
form help
For Case True, you might just have code that raises a message saying the
outcome was achieved. For Case False, you would have code that automatically opens up another form to record the variance, action taken and outcome. For Case Else, you might just have code that raises a message saying it is not known whether the outcome has been achieved. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message ... Sorry to appear total thick but what is code to do something is this where I make up the code to goto the other form? Thanks for your patience "Steve" wrote: Add the following code to the AftrUpdate event of your checkbox: Select Case Me!NameOfYourCheckbox.Value Case True Code to do something Case False Code to do something Case Else Code to do something End Select The code under Case True will run when you check the checkbox. The code under Case False will run when you uncheck the checkbox. The code under Case Else will run when you first click on the checkbox when it is not checked. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message news I am fairly new to access and the use of codes,do you know the code which will let me do this or were I'm likely to find one. Thanks "Steve" wrote: Open your form in design view and selecthe checkbox. Go to Properties - Data and set Triple State to Yes. (Look up Triple State in the Help file). You can now use the checkbox to indicate yes, no or missing. To take appropriate action, add code to the AfterUpdate event of the checkbox. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#7
|
|||
|
|||
form help
You would change the data type of achieved to number. You can then use an option group bound to this field. In the afterupdate of the option group, assuming 1 is yes, 2 is no, 3 is missing...
Select Case Achieved Case 1 'do nothing it seems Case 2 DoCmd.OpenForm "name of form you want to open" Case 3 'I don't know what you want to do here' End Select Steve's solution will not work for you, since a checkbox bound to a yes/no field will always store true or false. It doesn't matter if its triple state is set to true; a yes/no field cannot store a null. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#8
|
|||
|
|||
form help
I put in the following:
Select Case Me!Achieved.Value Case True MsgBox "Outcome Achieved" Case False Openmyfrm ("Ongoing Assessment Variance") before I put this code in I put a module code like this Public Function Openmyfrm(myfrmname As String) DoCmd.OpenForm myfrmname End Function I actually forgot to to put in anything for the Case Else. I'll try it when I get home. Joan would I have to put in the module code in using your method? Thanks for the advice in advance "Joan Wild" wrote: You would change the data type of achieved to number. You can then use an option group bound to this field. In the afterupdate of the option group, assuming 1 is yes, 2 is no, 3 is missing... Select Case Achieved Case 1 'do nothing it seems Case 2 DoCmd.OpenForm "name of form you want to open" Case 3 'I don't know what you want to do here' End Select Steve's solution will not work for you, since a checkbox bound to a yes/no field will always store true or false. It doesn't matter if its triple state is set to true; a yes/no field cannot store a null. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#9
|
|||
|
|||
form help
Your original post said that you wanted a field that held three values True, False, Missing. You can't use a yes/no field for this. change the Achieved field from Yes/No to Number - integer size. On your form I would use an option group with three options
1 - Yes 2 - No 3 - unknown or missing Assuming the option group is named Achieved and is bound to the Achieved field Select Case Me!Achieved Case 1 MsgBox "Outcome Achieved" Case 2 DoCmd.OpenForm "Ongoing Assessment Variance" Case 3 ' what do you want to do if it's unknown/missing? End Select I don't see any value in having a separate function to open a form, although there's no harm. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I put in the following: Select Case Me!Achieved.Value Case True MsgBox "Outcome Achieved" Case False Openmyfrm ("Ongoing Assessment Variance") before I put this code in I put a module code like this Public Function Openmyfrm(myfrmname As String) DoCmd.OpenForm myfrmname End Function I actually forgot to to put in anything for the Case Else. I'll try it when I get home. Joan would I have to put in the module code in using your method? Thanks for the advice in advance "Joan Wild" wrote: You would change the data type of achieved to number. You can then use an option group bound to this field. In the afterupdate of the option group, assuming 1 is yes, 2 is no, 3 is missing... Select Case Achieved Case 1 'do nothing it seems Case 2 DoCmd.OpenForm "name of form you want to open" Case 3 'I don't know what you want to do here' End Select Steve's solution will not work for you, since a checkbox bound to a yes/no field will always store true or false. It doesn't matter if its triple state is set to true; a yes/no field cannot store a null. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
#10
|
|||
|
|||
form help
Can you tell me how to set up an option group with three options please.
"Joan Wild" wrote: Your original post said that you wanted a field that held three values True, False, Missing. You can't use a yes/no field for this. change the Achieved field from Yes/No to Number - integer size. On your form I would use an option group with three options 1 - Yes 2 - No 3 - unknown or missing Assuming the option group is named Achieved and is bound to the Achieved field Select Case Me!Achieved Case 1 MsgBox "Outcome Achieved" Case 2 DoCmd.OpenForm "Ongoing Assessment Variance" Case 3 ' what do you want to do if it's unknown/missing? End Select I don't see any value in having a separate function to open a form, although there's no harm. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I put in the following: Select Case Me!Achieved.Value Case True MsgBox "Outcome Achieved" Case False Openmyfrm ("Ongoing Assessment Variance") before I put this code in I put a module code like this Public Function Openmyfrm(myfrmname As String) DoCmd.OpenForm myfrmname End Function I actually forgot to to put in anything for the Case Else. I'll try it when I get home. Joan would I have to put in the module code in using your method? Thanks for the advice in advance "Joan Wild" wrote: You would change the data type of achieved to number. You can then use an option group bound to this field. In the afterupdate of the option group, assuming 1 is yes, 2 is no, 3 is missing... Select Case Achieved Case 1 'do nothing it seems Case 2 DoCmd.OpenForm "name of form you want to open" Case 3 'I don't know what you want to do here' End Select Steve's solution will not work for you, since a checkbox bound to a yes/no field will always store true or false. It doesn't matter if its triple state is set to true; a yes/no field cannot store a null. -- Joan Wild Microsoft Access MVP "JEM" wrote in message ... I am designing a database, after taken advice previously I have read up and managed to normalise the fields in my tables. I was however, wondering if there is a way when an outcome is not achieved it automatically opens up another form to record the variance, action taken and outcome. The achieved field was a yes/no data type however, again after reading others experiences I was thinking either to make the field a number or text type with a list box with values of yes, no or missing. Can anyone please advice? Thanks in advance. |
|
Thread Tools | |
Display Modes | |
|
|