I have developed a database for my CD collections. I am trying to develop serial number of each CD which will populate based on data entered in a form called frmCDDetails. This form is based on a table called tblCDDetails which combines data from various tables.
Table 1 tblMusicCategor y
Field 1: MusicCategoryID - Auto Number (Primary)
Field 2: MusicCategory - text
Field 3: MusicCategoryAb bv - text
Each category is uniquely given 2-letter abbreviation. Examples, Easy Listening = EL, Jazz = JZ, Classical = CL, Country = CO
Table 2 tblArtists
Field 1 ArtistID - Auto Number (Primary)
Field 2 ArtistName - text
Field 3 ArtistAbbv - text
Each artist is given a 3-letter abbreviation to identify them. for example, John Denver is JDA, Julio Iglesias is JIB, Fran Sinatra FSC etc.
I want the serial number to read as XX.YYY.00.000.0 000
XX = 2 letter from the category
YYY = 3 letter from the artist
00 = running number of CD for that artist
000 = running number for that category
0000 = running number for the entire collection.
Example: CO.JDA.10.030.0 275
I
This means this CD is the 10th CD by John Denver. There are 30 CDs in Country Category and the Total CD collection is 275
I am trying to get this Serial number to be automatically populated when I select 1)MusicCategory ID and 2)ArtistID. In other words, as I select Country in the Category the text box for the Serial number will popualate as CO. and as I enter John Denver's name, the Serail number will populate as CO.JDA.10.030.0 275
This is my goal.
So far I succeeded in creating the 2-letter Category part by using Choose function in a text box on the form frmCDDetails.
The rest I am struggling. For example, I couldn't get the Artist Abbreviation to display (instead the Artist ID number is displayed). Perhaps because ArtistID is not a part of the tblCDDetails but of a different table called tblArtists which is used for a subform and added to the frmCDDetails.
Can someone please help me with this?
Please remember I am a Novice and don't have much knowledge of VBA or specific functions unless it's explained with an example.
Many thanks to all the gurus out there. I am hoping one of you can help.
Table 1 tblMusicCategor y
Field 1: MusicCategoryID - Auto Number (Primary)
Field 2: MusicCategory - text
Field 3: MusicCategoryAb bv - text
Each category is uniquely given 2-letter abbreviation. Examples, Easy Listening = EL, Jazz = JZ, Classical = CL, Country = CO
Table 2 tblArtists
Field 1 ArtistID - Auto Number (Primary)
Field 2 ArtistName - text
Field 3 ArtistAbbv - text
Each artist is given a 3-letter abbreviation to identify them. for example, John Denver is JDA, Julio Iglesias is JIB, Fran Sinatra FSC etc.
I want the serial number to read as XX.YYY.00.000.0 000
XX = 2 letter from the category
YYY = 3 letter from the artist
00 = running number of CD for that artist
000 = running number for that category
0000 = running number for the entire collection.
Example: CO.JDA.10.030.0 275
I
This means this CD is the 10th CD by John Denver. There are 30 CDs in Country Category and the Total CD collection is 275
I am trying to get this Serial number to be automatically populated when I select 1)MusicCategory ID and 2)ArtistID. In other words, as I select Country in the Category the text box for the Serial number will popualate as CO. and as I enter John Denver's name, the Serail number will populate as CO.JDA.10.030.0 275
This is my goal.
So far I succeeded in creating the 2-letter Category part by using Choose function in a text box on the form frmCDDetails.
The rest I am struggling. For example, I couldn't get the Artist Abbreviation to display (instead the Artist ID number is displayed). Perhaps because ArtistID is not a part of the tblCDDetails but of a different table called tblArtists which is used for a subform and added to the frmCDDetails.
Can someone please help me with this?
Please remember I am a Novice and don't have much knowledge of VBA or specific functions unless it's explained with an example.
Many thanks to all the gurus out there. I am hoping one of you can help.
Comment