Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: yes/no box checked yes based on certian user

Geek News

yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/14/2008 4:30:54 PM
I want to have a hidden yes/no box marked yes on a form when a certian user
creates a record on a form. I am trying to track leads a cold caller makes
and gives to sales people. then i can run a query to display all the
contacts where the box is yes. I

--
Message posted via http://www.accessmonster.com

Re: yes/no box checked yes based on certian user
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 11/14/2008 4:39:10 PM
Use the form's AfterInsert event to set the value of the checkbox:

Private Sub Form_AfterInsert()
If Me.CertainUser = "TheCorrectUser" Then _
Me.NameOfCheckboxControl.Value = True
End If

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



"jomara via AccessMonster.com" <u27274[ at ]uwe> wrote in message
news:8d2f09258282f[ at ]uwe...
[Quoted Text]
>I want to have a hidden yes/no box marked yes on a form when a certian
>user
> creates a record on a form. I am trying to track leads a cold caller
> makes
> and gives to sales people. then i can run a query to display all the
> contacts where the box is yes. I
>
> --
> Message posted via http://www.accessmonster.com
>


Re: yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/14/2008 5:36:04 PM
Thanks for the quick reply must have done soomething wrong here is my code
Private Sub Form_AfterInsert()
If Me.Rep = "78" Then _
Me.ColdCall.Value = True


End Sub

the End If caused a compile error so i took it out
rep is the field for the user, 78 is the user number, and coldcall is the
yes/no checkbox
Ken Snell (MVP) wrote:
[Quoted Text]
>Use the form's AfterInsert event to set the value of the checkbox:
>
>Private Sub Form_AfterInsert()
>If Me.CertainUser = "TheCorrectUser" Then _
> Me.NameOfCheckboxControl.Value = True
>End If
>
>>I want to have a hidden yes/no box marked yes on a form when a certian
>>user
>> creates a record on a form. I am trying to track leads a cold caller
>> makes
>> and gives to sales people. then i can run a query to display all the
>> contacts where the box is yes. I

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/14/2008 5:37:24 PM
Sorry i am getting a message that the data could not be saved

jomara wrote:
[Quoted Text]
>Thanks for the quick reply must have done soomething wrong here is my code
>Private Sub Form_AfterInsert()
>If Me.Rep = "78" Then _
> Me.ColdCall.Value = True
>
>End Sub
>
>the End If caused a compile error so i took it out
>rep is the field for the user, 78 is the user number, and coldcall is the
>yes/no checkbox
>>Use the form's AfterInsert event to set the value of the checkbox:
>>
>[quoted text clipped - 9 lines]
>>> and gives to sales people. then i can run a query to display all the
>>> contacts where the box is yes. I

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: yes/no box checked yes based on certian user
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 11/14/2008 7:01:09 PM
The error message you're getting might be related to any of the fields'
values that are being updated/edited on the form. Is this checkbox code the
only change you've made since the form was working ok?

Try moving the code to the form's BeforeUpdate event instead of the form's
AfterInsert event.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"jomara via AccessMonster.com" <u27274[ at ]uwe> wrote in message
news:8d2f9dc6220fa[ at ]uwe...
[Quoted Text]
> Sorry i am getting a message that the data could not be saved
>
> jomara wrote:
>>Thanks for the quick reply must have done soomething wrong here is my code
>>Private Sub Form_AfterInsert()
>>If Me.Rep = "78" Then _
>> Me.ColdCall.Value = True
>>
>>End Sub
>>
>>the End If caused a compile error so i took it out
>>rep is the field for the user, 78 is the user number, and coldcall is the
>>yes/no checkbox
>>>Use the form's AfterInsert event to set the value of the checkbox:
>>>
>>[quoted text clipped - 9 lines]
>>>> and gives to sales people. then i can run a query to display all the
>>>> contacts where the box is yes. I
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1
>


Re: yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/14/2008 8:17:17 PM
moving it to the before update worked thanks for the help

Ken Snell (MVP) wrote:
[Quoted Text]
>The error message you're getting might be related to any of the fields'
>values that are being updated/edited on the form. Is this checkbox code the
>only change you've made since the form was working ok?
>
>Try moving the code to the form's BeforeUpdate event instead of the form's
>AfterInsert event.
>> Sorry i am getting a message that the data could not be saved
>>
>[quoted text clipped - 13 lines]
>>>>> and gives to sales people. then i can run a query to display all the
>>>>> contacts where the box is yes. I

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/14/2008 9:02:33 PM
do have one more question if i had 2 users i wanted to track would it be 78
or 50 or is there another way to write that
jomara wrote:
[Quoted Text]
>moving it to the before update worked thanks for the help
>
>>The error message you're getting might be related to any of the fields'
>>values that are being updated/edited on the form. Is this checkbox code the
>[quoted text clipped - 7 lines]
>>>>>> and gives to sales people. then i can run a query to display all the
>>>>>> contacts where the box is yes. I

--
Message posted via http://www.accessmonster.com

Re: yes/no box checked yes based on certian user
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 11/15/2008 4:46:57 AM
If Me.Rep = "78" Or Me.Rep = "50" Then _
Me.ColdCall.Value = True

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"jomara via AccessMonster.com" <u27274[ at ]uwe> wrote in message
news:8d31686e189fd[ at ]uwe...
[Quoted Text]
> do have one more question if i had 2 users i wanted to track would it be
> 78
> or 50 or is there another way to write that
> jomara wrote:
>>moving it to the before update worked thanks for the help
>>
>>>The error message you're getting might be related to any of the fields'
>>>values that are being updated/edited on the form. Is this checkbox code
>>>the
>>[quoted text clipped - 7 lines]
>>>>>>> and gives to sales people. then i can run a query to display all
>>>>>>> the
>>>>>>> contacts where the box is yes. I
>
> --
> Message posted via http://www.accessmonster.com
>


Re: yes/no box checked yes based on certian user
"jomara via AccessMonster.com" <u27274[ at ]uwe> 11/17/2008 4:16:20 PM
Thanks

Ken Snell (MVP) wrote:
[Quoted Text]
>If Me.Rep = "78" Or Me.Rep = "50" Then _
> Me.ColdCall.Value = True
>
>> do have one more question if i had 2 users i wanted to track would it be
>> 78
>[quoted text clipped - 8 lines]
>>>>>>>> the
>>>>>>>> contacts where the box is yes. I

--
Message posted via http://www.accessmonster.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net