Solved Problems creating entries in the "wrong" table (1 Viewer)

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
I'm still interesting in how you could get the ringt ID for the song @bobfitz.
 

isladogs

MVP / VIP
Local time
Today, 00:31
Joined
Jan 14, 2017
Messages
18,186
Leif
Bob is having similar issues to those I was experiencing last night before my computer crashed.
To my mind, once the song title is selected in the subform, the other columns should be mainly or entirely self populating.
I couldn't make sense of the final column - either what it meant or what I should do with it.

Due to my own computer issues, I'm going to have to drop out as well.
I would suggest that you do a major rewrite of your app from the beginning
Get the table structure right then create new forms

Good luck

BTW is there a Swedish language Access forum you could go to for help?
 

bob fitz

AWF VIP
Local time
Today, 00:31
Joined
May 23, 2011
Messages
4,717
I'm still interesting in how you could get the ringt ID for the song @bobfitz.
Sorry if I've misled you. I didn't. I was just trying to understand the data, the structure and the desired result. Seems I at least managed a little understanding of the desired result.

I would "second" the advice that Colin has offered in post #42.
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Thank you guys! I think about what you recomend.

Still I think there's something wrong about how I set it up.

Have a wonderful life!

Leif
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
I decided not to give up so easily with you.
You wanted me to start over, so I deleted all the forms and questions in the old database.
Then I renamed all the names of tables and fields to English.
I then created a form for artists and their music.
What I want help with is of course if the structure of the database works for a vinyl collection.
I failed to create a form where I can create new records from my vinyl collection, add songs from the table tbl_music and if they are missing in that table also add new songs to it from the same form.
Actually the same thing I wanted before.
Hope you feel like accepting the challenge.
Leif
 

Attachments

  • records_eng.accdb
    3.3 MB · Views: 128

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
I succeded in creating the form and proceding with the databse.
Hold on downloading the one thats in this tread.
A new one is coming.
All in english.
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Here comes the latest version.
As I said, I managed to create the form to create records for records (funny).
But it is not finished, still can not save in the subform.
Leif
 

Attachments

  • records_eng.accdb
    3.3 MB · Views: 119

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:31
Joined
May 7, 2009
Messages
19,169
see frm_record2, is this what you need to accomplish.
please Zip your attachment, to be able to quickly download it.
 

Attachments

  • records_eng (1).zip
    201 KB · Views: 124

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Thanks, @arnelgp
I will try to remember to zip it in the future.

Yes it works as I intended but I lack the order of the songs on the record.
Could it be that it became a hassle because the field with the order was in the table that was the middle table in many to many realtions between the tables records and music?
found no better place in the structure to place that field.
I will look further into this tonight.
Leif
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Sorry, I saw that the order was in the form now.
It looks exactly what I want, wondering what wrong I did?
Leif
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Thanks @arnoldg.

Now it works to add titles from the combo box to new vinyl records.
But if the title is not in tbl_music, I want to be able to enter it in the combo box and that it is then saved in tbl_music at the same time as it is added to the vinyl record in the table tbl_music_record.
If you download this new version of the database, I have in post 1 in frm_record2 a single with Stevie Wonder.
The A side is Part Time Lover and the B side should be the same song but instrumental.
I want to be able to enter the name of the B side with the extension "Instrumental" and that it is saved both in tbl_musik and in tbl_music_record.
Guess some code is required.

I have tested with this but can not find the right code to get record_artist_ID which must be stored at the same time.

Private Sub music_record_music_NotInList(NewData As String, Response As Integer)
Dim strTmp As String

'Get confirmation that this is not just a spelling error.
strTmp = "Add '" & NewData & "' as a new titel?"
If MsgBox (strTmp, vbYesNo + vbDefaultButton2 + vbQuestion, "Not in list") = vbYes Then

'Append the NewData as a record in the music table.
strTmp = "INSERT INTO tbl_music (music_titel)" & _
"SELECT" "" & NewData & "" "AS music_titel;"
DBEngine (0) (0) .Execute strTmp, dbFailOnError

'Notify Access about the new record, so it requeries the combo.
Response = acDataErrAdded
End If
End Sub

Once again, I trust in you out there!

Leif
 

Attachments

  • records_eng.zip
    299.5 KB · Views: 120

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:31
Joined
May 7, 2009
Messages
19,169
try this
 

Attachments

  • records_eng.zip
    300.8 KB · Views: 119

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
THANK YOU @arnelgp
I had never been able to figure out that code by Goggling.
I consider myself able to structure databases and SQL because I have worked with PHP and MySQL.
But then just tied to the web.
I am very grateful and now I can move on in the project of fixing the look of the forms and filling the database with records from my vinyl collection. After that, the songs will be added to my radio programs, but then there will be new tables.
Have a really good weekend! @bob fitz @isladogs
Leif
 

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Hello @arnelgp
I've been trying to understand the code you helped me with.
I was going to use it on another form that has similar needs.
But unfortunately I can not interpret it so that I understand it.
What does it start for example, what happens first, what initiates it to happen.
I wonder if you feel like explaining?
Or even better, do the same on a new form.
This applies to frm_program.
There I have collected the content of my disco radio programs and want it to be possible to create new programs and add songs in them, either from my table or that it is possible to add new songs in a similar way that you helped me with in the record form.
Here is also a small box with transmission data that I want to be able to fill in for a new program.
Some of the labels are in swedish, I hope that won't be a problem for you.
If you would like to watch it, I would be grateful.
I've attaches the database, which now has new records.

Leif
 

Attachments

  • records_eng.zip
    370.2 KB · Views: 127

lodmark

Member
Local time
Today, 01:31
Joined
Jul 24, 2020
Messages
232
Alright! Now the database is all english for you to try on.
The form is frm_program.
There I have collected the content of my disco radio programs and want it to be possible to create new programs and add songs in them, either from my table with music or that it is possible to add new songs in a similar way thats in the record2 form.
In the frm_program there is also a small box with transmission data that I want to be able to fill in for a new program.

Leif
 

Attachments

  • records_all_english.zip
    258.3 KB · Views: 127

Users who are viewing this thread

Top Bottom