PC Review


Reply
Thread Tools Rate Thread

append posting 0 value AND order question of subform

 
 
=?Utf-8?B?SWFu?=
Guest
Posts: n/a
 
      21st Jan 2007
I'm using a form and subform (answers/answersub) to create a survey. The
user enters the patientID, date and user name in the main form then hit a
button for long or survery. This triggers a macro to open an append query
that posts the patientID, user, date (from the form) and questions info (from
the questions table) into an answers table. Two problems
1. the first record appended is the record has zero values for the question,
questionID and order (the patientID, user and date are filled in). I think
it's grabbing the record marked [autonumber] from the question table. I've
tried to say that order and/or questionID Is Not Null or <>0 in the append
criteria but it doens't prevent the problem (see SQL statement below)
2. The order of the questions in the subform is descending all the time.
I've set the order property in the subform to answers.order but it doesn't
have an effect (I assume because the form is already loaded). Can I refresh
this somehow?

Thanks Ian.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SWFu?=
Guest
Posts: n/a
 
      21st Jan 2007
Forgot SQL statement
INSERT INTO Answers ( PatientID, [Date], [User], QuestionID, Question,
[Order] )
SELECT forms.answers.patientID AS PatientID, forms!answers!date AS [Date],
forms.answers.user AS [User], Questions.QuestionID, Questions.Question,
Questions.OrderLOng
FROM Questions
WHERE (((Questions.ActiveLong)=Yes))
GROUP BY forms.answers.patientID, forms!answers!date, forms.answers.user,
Questions.QuestionID, Questions.Question, Questions.OrderLOng
HAVING (((Questions.OrderLOng)<>0));

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting Order Question shydragon Microsoft Outlook Discussion 3 11th Jan 2009 01:20 AM
Append Query Problem - Posting record only once wesley.allen@gmail.com Microsoft Access Queries 6 8th Nov 2007 02:56 PM
Double Click to Add Record from subform to order details subform =?Utf-8?B?QnJpYW4=?= Microsoft Access Database Table Design 2 19th Feb 2007 03:57 PM
append query posting data entry line too =?Utf-8?B?SWFu?= Microsoft Access Queries 1 22nd Jan 2007 01:40 PM
Question: Top posting reply versus bottom posting Greasy Rider© @invalid.com Microsoft Outlook Discussion 2 22nd Jun 2005 01:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:54 PM.