1

I am trying to create a basic database using access but I'm just learning at the minute.

I have a text file which contains, customer account code (contains duplicates), customer address type, customer name and telephone number.

I have created a table by linking to this source data. (If I refresh this data in the future will I lose any linked data, if that makes sense?).

I want to be able to add through a form, company registration number and email address.

How do I do this? I know a bit about basic tables and forms but I am struggling to understand relationships.

Thanks in advance,

Dave

closed as off-topic by Vérace, RLF, RolandoMySQLDBA, ypercubeᵀᴹ, Max Vernon Jun 29 '15 at 22:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Tip of the iceberg - the question or comments reveal an underlying issue that would need extensive investigation by a consultant or database vendor support team: issues like this do not fit the SE Q&A model well. For more information see this meta post." – RLF, Max Vernon
If this question can be reworded to fit the rules in the help center, please edit the question.

0

I don't have Microsoft Access, but I created a test in MySQL.

My table (freddy) - don't pay attention to the name:

mysql> select * from freddy;
+-------+----------------+
| regno | email          |
+-------+----------------+
|     2 | blah@blah1.com |
|     2 | blah@ah1.com   |
|     2 | blah@ah1.com   |
|     4 | blah@ah1.com   |
+-------+----------------+
4 rows in set (0.00 sec)

Then run the following query:

SELECT regno, email FROM freddy GROUP BY regno, email;

+-------+----------------+
| regno | email          |
+-------+----------------+
|     2 | blah@ah1.com   |
|     2 | blah@blah1.com |
|     4 | blah@ah1.com   |
+-------+----------------+
3 rows in set (0.00 sec)

So, as you can see, the 2 rows 2, blah@ah1.com have been deduplicated. So, you run a similar query on your customer_account_code (GROUP BY - or since you're only selecting on 1 field, you can use DISTINCT) e.g.

mysql> SELECT DISTINCT(regno) FROM freddy;
+-------+
| regno |
+-------+
|     2 |
|     4 |
+-------+
2 rows in set (0.00 sec)

Then set up your form to bring these up and allow your user to add a company_reg and company_email.

However, this is very close to a programming (and not a DBA) question. If you have more trouble with the SQL, then come back here, but otherwise, I think you need an Access and/or Programming forum - StackOverflow perhaps?

Not the answer you're looking for? Browse other questions tagged or ask your own question.