UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Adding New Field To Existing Form Causing An Error., Access 2010    
 
   
ciapul12
post Feb 21 2018, 05:14 AM
Post#1



Posts: 263
Joined: 7-June 14



Hi All,
I have a free demo of survey downloaded from web.
I wanted to add additional fields to Question sub-form but for some reason I'm getting a lot of errors.
Can someone take a look and let me know where I went wrong?

I have added new attachment field to the table and then added that field to query and form but when starting new survey and the same response is provided as in one of the previous surveys it then loads up the attachments that was added to previous survey.
No idea how to overcome this issue...
I also need comment field for every answer and had the same issue.

Best Regards
Dan
Attached File  Questionnaire.zip ( 1.04MB )Number of downloads: 14
Go to the top of the page
 
ranman256
post Feb 21 2018, 06:55 AM
Post#2



Posts: 883
Joined: 25-April 14



what question did you add?
what errors are you getting?
where are errors , in the form? ,in the query?
Go to the top of the page
 
BruceM
post Feb 21 2018, 08:03 AM
Post#3


UtterAccess VIP
Posts: 7,755
Joined: 24-May 10
From: Downeast Maine


I've never been a fan of multi-field primary keys, since it means relationships must be on all of the fields. There has been a lot of discussion over the years on this topic, with some advocating for "natural" primary keys only, even if it means a ten-field key. I come down firmly on the side of using surrogate keys, autonumber in particular. If there needs to be a unique multi-field constraint, I create a multi-field unique index, which does not necessarily have to be a primary key.

However, I don't think that is the problem, although your question is vague about the nature of the problems. I can tell you that one problem is the QuestionIndex field is required, but with the Not In List event you try to insert a new record without writing data to that field. I question the need to ask the user if what was just typed was intended, but that is of course up to you and the users.
Go to the top of the page
 
ciapul12
post Feb 21 2018, 08:11 AM
Post#4



Posts: 263
Joined: 7-June 14



Hi There
I was trying to replicate errors I was getting earlier and couldn't do it despite following the same steps as when I was getting errors.
I guess the biggest problem now is to find out where I should add new fields i.e which table,query, form...
Whats is happening now is that for example when I attach an image to a specific question/answer the same image is then automatically loaded onto the new questionnaire when the same answer is selected for the same question. This is driving me mad! And I don't understand why this is happening..

The same goes for comments field, I don't really know where to place it so that it is specific to that particular questionnaire/question/answer..

Would appreciate if someone could let me know where/how the attachment and memo fields can be added so that for every question I'll have an option of providing an answer, attaching file and providing comments..

Best Regards and Thank You in advance.
Dan
Attached File(s)
Attached File  error.jpg ( 29.7K )Number of downloads: 13
 
Go to the top of the page
 
BruceM
post Feb 21 2018, 08:28 AM
Post#5


UtterAccess VIP
Posts: 7,755
Joined: 24-May 10
From: Downeast Maine


QUOTE
Whats is happening now is that for example when I attach an image to a specific question/answer the same image is then automatically loaded onto the new questionnaire when the same answer is selected for the same question.

Please provide a specific example of attaching an image to a specific question/answer. For instance: "Open the ___ form. Go to the ______ subform. Etc." Also, attaching an image to a question seems to me a rather different thing than attaching it to an answer, so that meaning needs to be clarified.

I cannot quite read the message on the attachment. It is very small, but when I increase the size it is too pixelated to read. I can make out the first part, but not the details about what went wrong.
Go to the top of the page
 
ciapul12
post Feb 21 2018, 09:45 AM
Post#6



Posts: 263
Joined: 7-June 14



I have typed a word doc with screen shoots so hopefully this is a better explanation of issue and what I'm trying to achieve..
Thank You
Dan
Attached File(s)
Attached File  I_have_added_new_attachment_and_Memo_fields_to.zip ( 1.47MB )Number of downloads: 12
 
Go to the top of the page
 
BruceM
post Feb 22 2018, 08:17 AM
Post#7


UtterAccess VIP
Posts: 7,755
Joined: 24-May 10
From: Downeast Maine


The screen shots you provided are somewhat different than how the forms look in the database you previously attached, so the nature of "doesn't work" is still unclear.

Edit: Removed mistaken information about PK to PK joins not being workable. That caveat applies only if joining an autonumber to another autonumber. I had thought that was happening, but on further review it was not. Additional information in next posting.
Go to the top of the page
 
ciapul12
post Feb 22 2018, 10:28 AM
Post#8



Posts: 263
Joined: 7-June 14



Oh Dear, I was hoping for a quick fix..
This is disappointing, I'll have to look for a different solution.
Thank You
Dan
Go to the top of the page
 
BruceM
post Feb 22 2018, 12:36 PM
Post#9


UtterAccess VIP
Posts: 7,755
Joined: 24-May 10
From: Downeast Maine


I have put out the call for others to take a look. As I said, I do not tend to work with composite (multi-field) primary keys. I understand how to do it when working with a junction table, as shown in the "Kinds of table relationships" link here.

I explained something poorly in my remarks about joins between PKs. There is nothing wrong with having a one-field PK joined to one of the two fields that together are the PK in another table, as between Questions and Answers in your database. I was thinking about joins between autonumber fields, but became addled in my attempt to follow the flow in your database, and mistakenly said there can't be a relationship between PK fields. Sorry about that.

Where I lose the flow is that QuestionID is joined to the two-field PK in Answers. That two-field PK is in turn joined to two of the three fields that comprise the PK of QuestionnaireAnswers. Another table is likewise joined to two of the three fields. Those three fields are then joined to three of the four fields that comprise the PK in Responses.

At the same time, ResponseSessions has an autonumber PK. It also has linking fields to Questionnaires and Respondents, but those are not part of a composite key. Sometimes there is an autonumber (surrogate) PK, and at other times a multi-field PK. The reason for the differerent approaches eludes me. However, if it works and if you can follow it, that's what really matters.

What exactly is the problem? In my brief testing with the attached database I had no problem adding an attachment when I double clicked the control on the form.
Go to the top of the page
 
ciapul12
post Feb 23 2018, 03:31 PM
Post#10



Posts: 263
Joined: 7-June 14



Hi Bruce. Thanks for your input.
I must say, I got lost in the design of this DB..
I have managed to add an attachment field which at first appeared to be working just fine but when I have opened the report the same attachment appeared on the same question across all different questionnaires...
What should Be happening is the attachment should be unique, meaning that if I have attached an image let’s say an image of a house to question A in one questionnaire and image of a dog in another questionnaire but on the same question then when generating report this should show 2 different questionnaires with all questions and answers and attachments that were added at the time of answering them and in this case these would have been two different attachments but because how report is built it pulls the same attachment to all questionnaires. Not sure if my description is clear enough....

Would you be able to send me test sample you’ve worked on? Maybe your solution works better than mine...

Thank You
Dan

Go to the top of the page
 
BruceM
post Feb 23 2018, 03:45 PM
Post#11


UtterAccess VIP
Posts: 7,755
Joined: 24-May 10
From: Downeast Maine


I don't have much more time now, and am not likely to return to this before Monday, but now I understand the problem is the report. I will have to look at the data in the form, and see how the same data are displayed in the report. I have to admit I still do not quite understand the struture of the database, or perhaps it is the terminology. For instance:

QUOTE
if I have attached an image let’s say an image of a house to question A in one questionnaire and image of a dog in another questionnaire but on the same question then when generating report this should show 2 different questionnaires with all questions and answers and attachments that were added at the time of answering them and in this case these would have been two different attachments but because how report is built it pulls the same attachment to all questionnaires.
When you refer to one questionnaire and another questionnaire, do you mean the same set of questions completed by two different people?

It may help if you describe the flow. For instance: I build the questionnaire on Form A. When it is completed, different users fill it out on Form B. Or whatever. The names are not intuitive to me.
Go to the top of the page
 
ciapul12
post Feb 23 2018, 03:59 PM
Post#12



Posts: 263
Joined: 7-June 14



Hi Bruce,
Yes that’s exactly what I meant, sorry.. Same questions completed by 2 different people...
I did not designed this database and despite studying it for quite few hours I’m still not able to figure it out...
If you can figure out how to add attachment field and memo field and get that report working properly it would be fantastic!

This database does everything I need it to do and the only 2 things missing are attachment and memo fields...

Best Regards
Dan
Go to the top of the page
 
zaxbat
post Feb 23 2018, 04:47 PM
Post#13



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Have never had an occasion to make one of these...never really even thought about it....looks fun though.




Does this project allow you to both create surveys as well as take surveys???? Just trying to get the overall picture.
This post has been edited by zaxbat: Feb 23 2018, 05:07 PM
Go to the top of the page
 
ciapul12
post Feb 23 2018, 05:22 PM
Post#14



Posts: 263
Joined: 7-June 14



Yeah It allows to create and take surveys and this is what I like about it!
Dan
Go to the top of the page
 
zaxbat
post Feb 23 2018, 05:28 PM
Post#15



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


The response session date field may need to be both date and time in case a respondent takes the survey twice on the same day. Just covering all of the bases.


Dont actually need the multi-select field or box.....it can be inferred if the questionnaire answers table has more than one answer for a given question.


The attach pic/obj field should be both in the questions table and in the answers table.....the question may need the visual aid and also the answer might be a pic rather than text.

The response table should have the memo field so that the survey taker can provide additional response that is not covered in the canned available response answers.

The survey taker may want to attach a response on rare occasions....so you could provide an attach field there, but that's just fluff IMO.

I could not make out all of the error message on the query pic that provided....so..need more info on that.
This post has been edited by zaxbat: Feb 23 2018, 05:39 PM
Go to the top of the page
 
ciapul12
post Feb 23 2018, 05:37 PM
Post#16



Posts: 263
Joined: 7-June 14



hmm, have you tried if this will work on attached sample?
Go to the top of the page
 
zaxbat
post Feb 23 2018, 05:48 PM
Post#17



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Still just trying to make sure I understand the purpose of each table.

Is the small question table and small answer table just for generalized questions and answers that may be used over and over in multiple surveys????? So they will just be available in a combo box to help the user create a new survey???
This post has been edited by zaxbat: Feb 23 2018, 05:49 PM
Go to the top of the page
 
ciapul12
post Feb 23 2018, 06:06 PM
Post#18



Posts: 263
Joined: 7-June 14



Yes, this is exactly what this is for
Go to the top of the page
 
zaxbat
post Feb 23 2018, 06:35 PM
Post#19



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


I tried creating a survey.....

that it needs an index on each question seems problematic.... should automatically number them 1 up but let you change it if you wish...should not stop and ask each time.

Similar theory with whether to save the questions each time.....too much....should have a button you can push to save if you choose but should not stop each time and demand a response.
Go to the top of the page
 
ciapul12
post Feb 25 2018, 03:56 PM
Post#20



Posts: 263
Joined: 7-June 14



At this stage I'm opened to anything really.
I'm stacked so any little help is a progress!

Thank You
Dan
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    13th December 2018 - 08:51 AM