By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

Access Help Pls (various)

P: 1
Hi Guys,

Any help offered on the below 2 queries (mind the pun) is gratefully received.

1) I'm constucting a db of betting results data. Each bet as a whole is called a "position" and every position has an underlying component. so Comps and Positions have a many-to-1 relationship respectively. This is because certain bets are parlays/multiples which means they can be made up of say 3 individual bets which are the components but the entire parlay is a position, so my table "Components" has a p.k CompID and also a PosID so parlay bets all share a common PosID. E.g CompID 4,5 & 6 all belong to PosID 3. If a

Since a position is simply a derivative of a component, I am then wanting to use a Group-By PosID append query to append new records to tbl Positions as and when I add new components.

When I manually enter a new record in my components table at the moment I am having to sort ascending by POSID to ensure I enter the next PosID number in sequence. This manually assigning of PosID is obviously not ideal especially since I want tbl Comp and tbl Pos joined by PosID with ref. integrity and it would be prone to data-entry error.

Can I get Access to automatically assign a new group of components the next PosID in the append qry since in tbl Positions POSID needs to behave like primary key and will always be unique but in tbl components POSId will obviously NOT be unique. I guess I would have to add new components through a form which divides components into groups - could allow to add 3 groups at a time or something.

2) I am trying to run a separate query to count winning and losing sequences using my field "Result". How do I get access to assign a new sequence number every time there is a change in the result field. N.b this is not a count of the number of like results within the sequence, just a count of the number of sequences so it will look like this.....

BetID Result Sequence

1 Won 1
2 Won 1
3 Lost 2
4 Lost 2
5 Lost 2
6 Won 3
7 Lost 4
8 Won 5
9 Won 5
10 Won 5



THANKS!
Jun 13 '07 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,494
For your first question you should be looking at forms and sub-forms I suspect.
Otherwise you would have to do it with code.
For the second, you will need to use code.
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.