A
AnotherNewbie
In Access 2003 I have a Table [tblLocations]. I want the Primary Key in field
[LocId] to be auto generated by combining [BldgId],[VtyId] and [RmNumId] of
the same Record. I am assuming that I have to write this in code but don't
know how.
Here's what I have so far
Database is 'SRL.mdb' I have several tables that have PKs that lead to the
table [tblLocations].
In that table have these fields:
LocId BldgId VtyId RmNumId
(datatype text) (datatype text) (datatype text) (datatype text)
(Blank right now) 1 3 078
I want the Primarykey to equal 13078
I don't think I can go to tblLocations.LocId propertys DefaultValue and
write it there.
I think I have to go to the Database window and click 'Modules' and then the
'New' icon which brings up Visual Basic. I would type:
PrivateSub
(the code)
EndSub
Don't know how to Procede.
[LocId] to be auto generated by combining [BldgId],[VtyId] and [RmNumId] of
the same Record. I am assuming that I have to write this in code but don't
know how.
Here's what I have so far
Database is 'SRL.mdb' I have several tables that have PKs that lead to the
table [tblLocations].
In that table have these fields:
LocId BldgId VtyId RmNumId
(datatype text) (datatype text) (datatype text) (datatype text)
(Blank right now) 1 3 078
I want the Primarykey to equal 13078
I don't think I can go to tblLocations.LocId propertys DefaultValue and
write it there.
I think I have to go to the Database window and click 'Modules' and then the
'New' icon which brings up Visual Basic. I would type:
PrivateSub
(the code)
EndSub
Don't know how to Procede.