ComicBookGuy
Registered User.
- Local time
- Today, 17:25
- Joined
- Mar 5, 2014
- Messages
- 30
Hi all,
This is the first time I've done something in Access. Previous coding experience is HTML and Basic, decades ago. Also, English is my second language. Probably way too long post, sorry.
Short version: When opening forms from my main form, I can't add or edit data. It says "Recordset cannot be updated". The forms AllowAdditions, and are not locked. The forms work properly when opened directly (not from main form).
Now as I said, I am a total Access rookie. I know nothing of table relationships (do I need to set them?), recordset definitions, DAO, ADO, ODBC, Union querys, Inner Joins etc. I've tried reading about this but I don't understand enough to understand what I read
From what I understand, my queries are based on a single table? Or?
Have attached database (it's a test database, the real will have about 1200 people) as ComicBookGuy_Register_DB.zip.
Background:
I work at an audio magazine for visually impaired people, in Sweden. We keep records of our subscribers. Every week we send cd's in envelopes, with printed address labels. We also read different printed magazines, burn to cd and send to subscribers in a certain town etc.
What I want to achieve:
A database, where users can add new subscribers, edit details, and print labels for different subscribtions. It will run on my desktop PC (Win 7, Access 2013) and my colleagues will use Access 2013 Runtime.
My problem:
I've almost (?) completed the task, through much googling.. I have forms that adds new subscribers, comboboxes that filters subscribers for a particular magazine, and creates & prints labels, and a form for viewing directory, and after a press of Unlock button, users can edit data as well.
Problem is, the above doesn't work when above forms are opened from my main form. It then says something like "Recordset cannot be updated."
(The label creation forms & report work, probably since no editing is necessary there anyway.) The "add subscriber-form" (frmNypren) works when opened directly, and the same goes for the view directory-form (frmVisaRegister). Both then allow editing, but not when opened from main form.
I've tried to set AllowAdditions, acEdit etc when opening forms. This is the code for opening view directory form (frmVisaRegister):
The form itself allow additions.
What I've done:
- A test database, with pretend subscribers (see attached post). All info about subscribers is stored here. Table is called registertest.
Other tables are tblSKånesTaltidning (just three values for the three different editions of our own magazine), tblKommuner (list of all towns in our region) and tblÖvrigaTidningar (list of all other magazines we read, record, and burn to cd).
Then some forms: frmHuvudformulär (main form, with buttons and comboboxes to open other forms and create labels).
frmNypren (roughly frmNewSubscr in English) where user can enter info about new subscriber, and save it to main table registertest.
frmVisaRegister (frmShowDirectory), shows all records in database. Locked, with button to unlock and allow editing. Also with a QuickSearch textbox.
Three different forms (frmVisaKommun, frmVisaUtgåva, frmVisaÖvriga) when creating address labels. Selects and filters correct addresses for subscribers. Calculates number of labels (DSum). Print button to start printing.
So, from my point of view, the problem could anything from a typo to huge structural problems. i don't know. I've spent many many hours searching, but if someone would want to take a look at the monster I've created, I would be very grateful!
Thanks,
Martin
This is the first time I've done something in Access. Previous coding experience is HTML and Basic, decades ago. Also, English is my second language. Probably way too long post, sorry.
Short version: When opening forms from my main form, I can't add or edit data. It says "Recordset cannot be updated". The forms AllowAdditions, and are not locked. The forms work properly when opened directly (not from main form).
Now as I said, I am a total Access rookie. I know nothing of table relationships (do I need to set them?), recordset definitions, DAO, ADO, ODBC, Union querys, Inner Joins etc. I've tried reading about this but I don't understand enough to understand what I read
Have attached database (it's a test database, the real will have about 1200 people) as ComicBookGuy_Register_DB.zip.
Background:
I work at an audio magazine for visually impaired people, in Sweden. We keep records of our subscribers. Every week we send cd's in envelopes, with printed address labels. We also read different printed magazines, burn to cd and send to subscribers in a certain town etc.
What I want to achieve:
A database, where users can add new subscribers, edit details, and print labels for different subscribtions. It will run on my desktop PC (Win 7, Access 2013) and my colleagues will use Access 2013 Runtime.
My problem:
I've almost (?) completed the task, through much googling.. I have forms that adds new subscribers, comboboxes that filters subscribers for a particular magazine, and creates & prints labels, and a form for viewing directory, and after a press of Unlock button, users can edit data as well.
Problem is, the above doesn't work when above forms are opened from my main form. It then says something like "Recordset cannot be updated."
(The label creation forms & report work, probably since no editing is necessary there anyway.) The "add subscriber-form" (frmNypren) works when opened directly, and the same goes for the view directory-form (frmVisaRegister). Both then allow editing, but not when opened from main form.
I've tried to set AllowAdditions, acEdit etc when opening forms. This is the code for opening view directory form (frmVisaRegister):
Code:
DoCmd.OpenForm "frmVisaRegister", acNormal, , , acFormEdit, acWindowNormal
What I've done:
- A test database, with pretend subscribers (see attached post). All info about subscribers is stored here. Table is called registertest.
Other tables are tblSKånesTaltidning (just three values for the three different editions of our own magazine), tblKommuner (list of all towns in our region) and tblÖvrigaTidningar (list of all other magazines we read, record, and burn to cd).
Then some forms: frmHuvudformulär (main form, with buttons and comboboxes to open other forms and create labels).
frmNypren (roughly frmNewSubscr in English) where user can enter info about new subscriber, and save it to main table registertest.
frmVisaRegister (frmShowDirectory), shows all records in database. Locked, with button to unlock and allow editing. Also with a QuickSearch textbox.
Three different forms (frmVisaKommun, frmVisaUtgåva, frmVisaÖvriga) when creating address labels. Selects and filters correct addresses for subscribers. Calculates number of labels (DSum). Print button to start printing.
So, from my point of view, the problem could anything from a typo to huge structural problems. i don't know. I've spent many many hours searching, but if someone would want to take a look at the monster I've created, I would be very grateful!
Thanks,
Martin