Beginner, need help w/ structure and recordsets and.. a lot more

ComicBookGuy

Registered User.
Local time
Today, 18:40
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):

Code:
DoCmd.OpenForm "frmVisaRegister", acNormal, , , acFormEdit, acWindowNormal
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
 

Attachments

The form should allow edits as well.

Save the DB in Access 2003 version then upload it again.
 
Thanks for taking a look, Mihail!

I'm starting to think that I've created unnecessary problems for myself. Initially I started this in Access 2002 (mdb), then imported some forms and/or controls to Access 2013 (accdb).

Tomorrow I'll make a new, small test created fully in Access 2013, and see if I get the same issues.
Thanks!
 
Well, today I made some new forms with the same functionality from scratch in Access 2013, and I don't get the same problem. Great!

That's what I get for being lazy and importing the old controls/forms I guess. I'll just redo them from scratch, no problem.

Thanks!
 
Thanks for taking a look, Mihail!

I'm starting to think that I've created unnecessary problems for myself. Initially I started this in Access 2002 (mdb), then imported some forms and/or controls to Access 2013 (accdb).

Tomorrow I'll make a new, small test created fully in Access 2013, and see if I get the same issues.
Thanks!
If you will be the single user... no problem.
But why to not create a DB in Access 2003 (a very good and stable version).
This way everyone will be able to work with your DB, not only the users that have 2013 installed.
 
The idea is to have 5 users, me included. The others will use Access 2013 Runtime. Bad idea? The others will only use the forms I create, no programming.

Should I save/export it as Access 2003 instead? Can I code it in A2013 anyway? (Don't have A2003),

Big thanks for your comments, this is stuff I have no clue about.
 
I use A2007. In this version I can create DBs in 2003 and 2002 versions. So, I think that you can create DBs in any versions older than you have (2013).
Except the multivalues fields I have no knowledge about new features. Only the interface is a bit improved between A 2003 and A 2013. BTW: I don't advice you to use multivalues fields.

So, my opinion/advice is to create your DB in A2003. This way you will not have problems with the users and you will gain more help from us (or from other guys in other forums).
 

Users who are viewing this thread

Back
Top Bottom