A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

form help



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2007, 06:50 PM posted to microsoft.public.access.tablesdbdesign
Jem
external usenet poster
 
Posts: 56
Default 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  
Old July 11th, 2007, 01:15 AM posted to microsoft.public.access.tablesdbdesign
Steve[_10_]
external usenet poster
 
Posts: 608
Default 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  
Old July 11th, 2007, 09:02 AM posted to microsoft.public.access.tablesdbdesign
Jem
external usenet poster
 
Posts: 56
Default 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.




  #4  
Old July 11th, 2007, 09:00 PM posted to microsoft.public.access.tablesdbdesign
Steve[_10_]
external usenet poster
 
Posts: 608
Default form help

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.






  #5  
Old July 11th, 2007, 11:16 PM posted to microsoft.public.access.tablesdbdesign
Jem
external usenet poster
 
Posts: 56
Default 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  
Old July 12th, 2007, 12:14 AM posted to microsoft.public.access.tablesdbdesign
Steve[_10_]
external usenet poster
 
Posts: 608
Default 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  
Old July 13th, 2007, 03:22 PM posted to microsoft.public.access.tablesdbdesign
Joan Wild
external usenet poster
 
Posts: 642
Default 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  
Old July 13th, 2007, 04:40 PM posted to microsoft.public.access.tablesdbdesign
Jem
external usenet poster
 
Posts: 56
Default 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  
Old July 14th, 2007, 04:13 PM posted to microsoft.public.access.tablesdbdesign
Joan Wild
external usenet poster
 
Posts: 642
Default 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  
Old July 17th, 2007, 09:46 AM posted to microsoft.public.access.tablesdbdesign
Jem
external usenet poster
 
Posts: 56
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.