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

A Simple Vba Application Required

P: 1
I am (aged 52) novice in MC Access VBA, though having soundf knowledge in FOXPRO programming. If someone can help me in achieving the
following, it will enable me get some momentum in my endeavour of learning
VBA for MS Access Database

I have a huge database (MAIL ID TABLE) of email ids & country to which it is related. Some common IDs operate in multiple countries. I have created a field COUNT which willprovide the count of ID in the database., and based on count I would like to assign Flag M for Multiple & U for Uniqe ID. I WANT to achieve this only by VBA Programming, though I am very much aware that this can be achieved by mulriple queries.

ID Country Count Flag
X11 FR 2 M
X12 FR 1 U
X13 FR 1 U
Y11 ES 2 M
Y12 ES 1 U
Y18 ES 1 U
X11 ES 2 M
Y11 UK 2 M
Z11 FR 3 M
Z11 UK 3 M
Z11 FR 3 M
Oct 12 '07 #1
Share this Question
Share on Google+
1 Reply


nico5038
Expert 2.5K+
P: 3,072
I am (aged 52) novice in MC Access VBA, though having soundf knowledge in FOXPRO programming. If someone can help me in achieving the
following, it will enable me get some momentum in my endeavour of learning
VBA for MS Access Database

I have a huge database (MAIL ID TABLE) of email ids & country to which it is related. Some common IDs operate in multiple countries. I have created a field COUNT which willprovide the count of ID in the database., and based on count I would like to assign Flag M for Multiple & U for Uniqe ID. I WANT to achieve this only by VBA Programming, though I am very much aware that this can be achieved by mulriple queries.

ID Country Count Flag
X11 FR 2 M
X12 FR 1 U
X13 FR 1 U
Y11 ES 2 M
Y12 ES 1 U
Y18 ES 1 U
X11 ES 2 M
Y11 UK 2 M
Z11 FR 3 M
Z11 UK 3 M
Z11 FR 3 M
I hope you are aware that the Count and the Flag are both redundant data.
I would advise you to drop both fields and use a GroupBy query with a Count(*) when you need the "U" or "M" selection of the ID's.
Recording these fields will require you to manage the fields whenever a row is added or deleted. As Access also allows direct updates in a table, there's no way to guard the consistency of the Count and Flag field.

Getting the idea ?

For your VBA experience I would advise you to open some VBA code and press F1 to get in the specific VBA help. Search e.g. for "Recordset processing" and see that there are some fine code samples you can use.
Also the site www.mvps.org/Access can be a valuable source for a lot of common Access issues.

Nic;o)
Oct 12 '07 #2

Post your reply

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