From: bob on
Hi

I need to allocate certain work to 2 teams, the only way I can think of
doing this is by building a counter and then giving the even numbers to one
team and the odd numbers to the other.

Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblTeamCounter", dbOpenDynaset)
rs.Edit
rs!RepNum = rs!RepNum + 1
rs.Update
rs.Close: Set rs = Nothing

The above code gives me the counter how do I code it to lookup the REPNum
and if it is even number then

Me.Team1 = True
Else
Me.Team2 = True

Or is there a better way of doing this?

Thanks,

Bob


From: Jeff Boyce on
Bob

How depends on what ... and you haven't describe what your data structure
looks like.

More info, please.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"bob" <bob@l???????.co.uk> wrote in message
news:O$pVEYN$KHA.4652(a)TK2MSFTNGP06.phx.gbl...
> Hi
>
> I need to allocate certain work to 2 teams, the only way I can think of
> doing this is by building a counter and then giving the even numbers to
> one team and the odd numbers to the other.
>
> Dim db As Database
> Dim rs As Recordset
> Set db = CurrentDb()
> Set rs = db.OpenRecordset("tblTeamCounter", dbOpenDynaset)
> rs.Edit
> rs!RepNum = rs!RepNum + 1
> rs.Update
> rs.Close: Set rs = Nothing
>
> The above code gives me the counter how do I code it to lookup the REPNum
> and if it is even number then
>
> Me.Team1 = True
> Else
> Me.Team2 = True
>
> Or is there a better way of doing this?
>
> Thanks,
>
> Bob
>


From: bob on
Jeff

What I am trying to do is lookup the data in table tblTeamCounter field
RepNum from form IncidentData if this is an even number then
Field Team1 on the IncidentDate form has a true value if its an odd number
then Field Team2 has a true value. The rest I can sort out, it is how to
code the lookup the value in the table and how it knows if it is odd or even
I am stuck with.

Hope this helps explains what I am trying to do.

Thanks,

Bob


"Jeff Boyce" <nonsense(a)nonsense.com> wrote in message
news:%23bLtoGO$KHA.5476(a)TK2MSFTNGP06.phx.gbl...
> Bob
>
> How depends on what ... and you haven't describe what your data structure
> looks like.
>
> More info, please.
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
>
> "bob" <bob@l???????.co.uk> wrote in message
> news:O$pVEYN$KHA.4652(a)TK2MSFTNGP06.phx.gbl...
>> Hi
>>
>> I need to allocate certain work to 2 teams, the only way I can think of
>> doing this is by building a counter and then giving the even numbers to
>> one team and the odd numbers to the other.
>>
>> Dim db As Database
>> Dim rs As Recordset
>> Set db = CurrentDb()
>> Set rs = db.OpenRecordset("tblTeamCounter", dbOpenDynaset)
>> rs.Edit
>> rs!RepNum = rs!RepNum + 1
>> rs.Update
>> rs.Close: Set rs = Nothing
>>
>> The above code gives me the counter how do I code it to lookup the REPNum
>> and if it is even number then
>>
>> Me.Team1 = True
>> Else
>> Me.Team2 = True
>>
>> Or is there a better way of doing this?
>>
>> Thanks,
>>
>> Bob
>>
>
>


From: Jeff Boyce on
Again, you are describing "how".

Consider posting a description of your table structure, something along the
lines of (example only):

tblStudent
StudentID
FName
LName
DOB
...

tblClass
ClassID
ClassTitle
ClassDescription
...

trelEnrollment
EnrollmentID
StudentID
ClassID
EnrollmentDate
...

This is a (very) rough outline of an overly-simplified class enrollment
table structure.

(still) more info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"bob" <bob@l???????.co.uk> wrote in message
news:OdhSyUO$KHA.3176(a)TK2MSFTNGP05.phx.gbl...
> Jeff
>
> What I am trying to do is lookup the data in table tblTeamCounter field
> RepNum from form IncidentData if this is an even number then
> Field Team1 on the IncidentDate form has a true value if its an odd number
> then Field Team2 has a true value. The rest I can sort out, it is how to
> code the lookup the value in the table and how it knows if it is odd or
> even I am stuck with.
>
> Hope this helps explains what I am trying to do.
>
> Thanks,
>
> Bob
>
>
> "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message
> news:%23bLtoGO$KHA.5476(a)TK2MSFTNGP06.phx.gbl...
>> Bob
>>
>> How depends on what ... and you haven't describe what your data structure
>> looks like.
>>
>> More info, please.
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> --
>> Disclaimer: This author may have received products and services mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>>
>> "bob" <bob@l???????.co.uk> wrote in message
>> news:O$pVEYN$KHA.4652(a)TK2MSFTNGP06.phx.gbl...
>>> Hi
>>>
>>> I need to allocate certain work to 2 teams, the only way I can think of
>>> doing this is by building a counter and then giving the even numbers to
>>> one team and the odd numbers to the other.
>>>
>>> Dim db As Database
>>> Dim rs As Recordset
>>> Set db = CurrentDb()
>>> Set rs = db.OpenRecordset("tblTeamCounter", dbOpenDynaset)
>>> rs.Edit
>>> rs!RepNum = rs!RepNum + 1
>>> rs.Update
>>> rs.Close: Set rs = Nothing
>>>
>>> The above code gives me the counter how do I code it to lookup the
>>> REPNum and if it is even number then
>>>
>>> Me.Team1 = True
>>> Else
>>> Me.Team2 = True
>>>
>>> Or is there a better way of doing this?
>>>
>>> Thanks,
>>>
>>> Bob
>>>
>>
>>
>
>


From: Jeff Boyce on
.... and on the other hand, if you are simply looking for someone to tell you
what button to push, please say so. My particular bent is to try to
understand the need before figuring out the tool.

I'm sure there will be folks willing to oblige.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"bob" <bob@l???????.co.uk> wrote in message
news:OdhSyUO$KHA.3176(a)TK2MSFTNGP05.phx.gbl...
> Jeff
>
> What I am trying to do is lookup the data in table tblTeamCounter field
> RepNum from form IncidentData if this is an even number then
> Field Team1 on the IncidentDate form has a true value if its an odd number
> then Field Team2 has a true value. The rest I can sort out, it is how to
> code the lookup the value in the table and how it knows if it is odd or
> even I am stuck with.
>
> Hope this helps explains what I am trying to do.
>
> Thanks,
>
> Bob
>
>
> "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message
> news:%23bLtoGO$KHA.5476(a)TK2MSFTNGP06.phx.gbl...
>> Bob
>>
>> How depends on what ... and you haven't describe what your data structure
>> looks like.
>>
>> More info, please.
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> --
>> Disclaimer: This author may have received products and services mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>>
>> "bob" <bob@l???????.co.uk> wrote in message
>> news:O$pVEYN$KHA.4652(a)TK2MSFTNGP06.phx.gbl...
>>> Hi
>>>
>>> I need to allocate certain work to 2 teams, the only way I can think of
>>> doing this is by building a counter and then giving the even numbers to
>>> one team and the odd numbers to the other.
>>>
>>> Dim db As Database
>>> Dim rs As Recordset
>>> Set db = CurrentDb()
>>> Set rs = db.OpenRecordset("tblTeamCounter", dbOpenDynaset)
>>> rs.Edit
>>> rs!RepNum = rs!RepNum + 1
>>> rs.Update
>>> rs.Close: Set rs = Nothing
>>>
>>> The above code gives me the counter how do I code it to lookup the
>>> REPNum and if it is even number then
>>>
>>> Me.Team1 = True
>>> Else
>>> Me.Team2 = True
>>>
>>> Or is there a better way of doing this?
>>>
>>> Thanks,
>>>
>>> Bob
>>>
>>
>>
>
>