So what you want is a primary table containing Reference Number, Username,
Telephone and a secont table linked to the first with lots of additional
phime numbers for that account
So if I'm right lets call the first table Users with
UserID Autonumber Key No duplicates
UserName Text
UserPhone Text
Lets call the second table AuxPhones
AuxPhoneID Autonumber Key No duplicates
UserID Long number
AuxPhone Text Indexed No duplicates
Create a form based on users
create a subform based on AuxPhones (the link is UserID
put the following code in the OnCurerent event of the subform
Private Sub Form_Current()
If IsNull(AuxPhone) Then
AuxPhone = Me.Parent!UserPhone
End If
End Sub
obviously you can only have 1 auxialliary phone the same as the UserPhone
otherwise duplicates will occurr
Phil
"Danny" <da************@yahoo.co.uk> wrote in message
news:d5**************************@posting.google.c om...
Sorry maybe I was a little unclear,
The 1st table contains a reference number that cannot have duplicates,
the 2nd table can.
I actually want a form for the 2nd table where the telephone number
field is automatically filled in (but can be overwritten), after I key
in the reference number.
"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message
news:<3f*********************@mercury.nildram.net> ...
Why 2 tables
Phil
"Danny" <da************@yahoo.co.uk> wrote in message
news:d5**************************@posting.google.c om... Ok I am trying to create this
2 Tables
1 form
The 1st table has Reference Number, Username, Telephone
The 2nd table has Reference Number, 2nd Telephone
Well what I would like to do is have the default value for 2nd
telephone to be telephone, the tables have reference number as primary
keys and are related via reference number too.
I am pretty sure this is a noobie question but would be very greatful
if someone could help.
Thanks