Solved Help with coding (1 Viewer)

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
Hello
I'm aware that I'm a little assertive when I post this as a new thread in a new forum.
Previously, my question was in Forms with the name "Problems creating entries in the" wrong "table".
With the help of @arnelgp, among others, my question was solved there.
But my continued work with the database caused a similar problem with another form.
The database contains my record collection and is under construction.
The idea is that it should contain all discs and that these should be able to be displayed and edited in mainly three forms, artists (frm_artist), discs (frm_record2) and programs (frm_program) and it is in the form frm_program that I have problems with the input.
@arnelgp helped me earlier with the entry in frm_record2.
In the form frm_program I want to be able to add new programs with a number of songs that I either choose from the table tbl_music or enter directly in the form (and then the song is saved in tbl_music).
Then I also want to be able to enter a date when the program was broadcast.
You see everything in the form because some programs are already in the database.
I think it's about coding.
Grateful for help.
Leif
 

Attachments

  • records_all_english.zip
    258.3 KB · Views: 130

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:16
Joined
May 7, 2009
Messages
19,169
i dont know what is still "missing" on your db.
i added new form to Media combobox, when not in list.
 

Attachments

  • records_all_english - 2.zip
    287.7 KB · Views: 203

June7

AWF VIP
Local time
Today, 01:16
Joined
Mar 9, 2014
Messages
5,423
The frm_program_music_order_subform doesn't allow entry of new records because of RecordSource query. tblProgram should not be included.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:16
Joined
May 7, 2009
Messages
19,169
some modification.
 

Attachments

  • records_all_english - 2.zip
    355.4 KB · Views: 211

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
The frm_program_music_order_subform doesn't allow entry of new records because of RecordSource query. tblProgram should not be included.

OK, thought that I fixed it but I can se now that I've used the quote in the subform again. I will change that later in the evening and post a new database.
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
some modification.

Looks nice @arnelgp and it will be easier to handle.
I'm not shure what you meen by " i added new form to Media combobox, when not in list. " Is it the new forms frm_new_artist, frm_new_media you are talking about?
I would like the same for frm_program.
That's what is "still missing" as you replied above.
And that the input from the form sets the right dependencies in other tables.

Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
@arnelgp
By the way what happened to the first two posts in the table tbl_record?
I can restore them so no problems but I wonder.
Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
@arnelgp
What happened to the Side/Track order that i could type in before.

Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
OK, thought that I fixed it but I can se now that I've used the quote in the subform again. I will change that later in the evening and post a new database.

But @arnelgp fixed the subform frm_record2_subform to frm_record2 and that subform has the query "Query1" as source. He fixed a form that adds records that are not in the table. So in some way it's possible.

Leif
 

plog

Banishment Pending
Local time
Today, 04:16
Joined
May 11, 2011
Messages
11,611
You're building a house on a poor foundation. You need to fix your tables and their relationships before working on forms (Reports actually should come before Forms as well).

There should be only 1 way to travel between tables in your Relationship Tool. Between tbl_record and tbl_music I can trace 4: via tbl_music_record, via tbl_artist, via tbl_media and directly (you have music_record_ID in tbl_music but you don't use it in the Relationship Tool). You need to fix that before proceeding. I don't know the answer, but those 3 tables should not all 3 be related to both tbl_record and tbl_music--most likely just tbl_music_record links to both of them. Then you need to decide of the artist/media belongs to the record record or the music record.

You also have music_pgm_ID in tbl_music but connect to tbl_program_music via music_ID. You should probably remove music_pgm_ID from tbl_music.

Also, since I don't know your data, What happens when multiple artists collaborate? Islands in the Stream, Ebony and Ivory, Under Pressure? Your system can't handle that. Does it need to?
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
You're building a house on a poor foundation. You need to fix your tables and their relationships before working on forms (Reports actually should come before Forms as well).........

Thank you @plog for your accurate and thorough analysis.
I can do nothing but agree with you.
I searched for a long time for a database template online for my record collection but I needed to add the management of my disco programs so I could not find anything online.
Finally, I started this database where the basis is the Excel list of titles that have been included in my radio programs.
But my record collection is so much bigger so I need an easy way to add records while I continue to produce radio programs.
Had my knowledge been sufficient to create the database, I would not have had to ask you questions here on the forum.
Some of the statements you make are completely correct and are due to me trying my best.
Some of the fields in the tables may be those that will not be used when the database is complete.
I intend to solve your last question by registering the songs on both artists
Finally, I am of course grateful for your comments.
Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
Now I played a bit with the form frm_program.
I have removed the questions for the two subforms that @June7 suggested and created subforms with the design tool.
I still want to be able to add new programs and songs to these programs.
I had an idea to choose an artist and then choose from the artist's songs that have been picked out with an SQL statement.
Therefore, I added two combo boxes for this purpose.
But I got stuck on how to create the selection of songs.
Then it remains how to save this.
As always, I am grateful.
Now it's Goodnight!
Leif
 

Attachments

  • records_all_english .zip
    364.7 KB · Views: 204

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
@arnelgp
After you've done "some modifications" there are some problems with adding songs that are not in the table tbl_music.
And I've lost the possibility to add order of the songs on the records subform.
I You would look at this I would be greatful.
Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
My bad @arnelgp
When I made the file "english" I've deleted a object on the form that you used in your code.
I will try to fix this in the morning.
So my fault intirely!
Leif
 

lodmark

Member
Local time
Today, 10:16
Joined
Jul 24, 2020
Messages
232
Hi I'm back!
I have now fixed the errors I made on the form that @arnelgp helped me with.
Now it works and I have continued to add more vinyl records to the database.
As I told you before, the basis of this database is an Excel sheet with music in my disco radio programs on Halmstad's local radio.
The programs are in Swedish but feel free to listen on Thursday evenings at 20:00 at http://radiohalmstad.se

My question concerns the form where I want to add music to new programs but also fill the list with music in the programs I have already done.
My Excel sheet contains the music linked to the artist and the date the program was broadcast.
This is now entered into different tables, tbl_artist, tbl_music, tbl_program, tbl_program_date and tbl_program_music where the last table connects the programs with the music because a song can appear in several programs.
The form is called frm_program and I have entered the songs for the first five programs by hand.

Now I want to be able to select program six in the form and then start adding the songs.
This is not possible. In the subform to frm_program where the songs appear, I have tried to add two combo boxes, one for the artist and the other for the music.
The idea is that it should only be these two when everything works.
When you have selected the artist in one combo box, only that artist's songs should be possible to select in the combo box for the music.

As always, I appeal to you for help with the code for this.
Is there anyone who is interested?

Leif
 

Attachments

  • records_all_english.zip
    432.5 KB · Views: 192

Users who are viewing this thread

Top Bottom