Selasa, 28 Juni 2016

Re: [MS_AccessPros] too many databases open export issue

 

Patty-


That query should run slower than your original.  How many rows are you exporting?  How big is the wo_master table?

I assume you have an index on person_id.  It might run faster with an index on modify_timestamp.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 28, 2016, at 9:22 PM, pattykf@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



thank you John,
I gave it a shot, it appeared to run through the query (bar moved on the bottom) but then the sql screen went blank and the mouse hover is just spinning. It appears stuck?
thankx
Patty


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Patty-

Try this:

SELECT W1.*
FROM wo_master_IM3_Elig_enc AS W1
WHERE modify_timestamp =
(SELECT MAX(modify_timestamp) FROM wo_master_IM3_elig_Enc AS W2
WHERE W2.person_id = W1.person_id);


John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 28, 2016, at 8:26 PM, pattykf@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have a query which will not export to excel. I have been able to export the one that was created that pulled in all the patients but this one that limits the patients to the last encounter will not export. IDEAS?

SELECT wo_master_IM3_elig_Enc.*
FROM wo_master_IM3_elig_Enc INNER JOIN (SELECT person_id, MAX(modify_timestamp) AS TimeMatch FROM wo_master_IM3_elig_Enc GROUP BY person_id)  AS MaxRecord ON (wo_master_IM3_elig_Enc.modify_timestamp = MaxRecord.TimeMatch) AND (wo_master_IM3_elig_Enc.person_id = MaxRecord.person_id);



thank you

Patty







__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Re: [MS_AccessPros] too many databases open export issue

 

thank you John,
I gave it a shot, it appeared to run through the query (bar moved on the bottom) but then the sql screen went blank and the mouse hover is just spinning. It appears stuck?
thankx
Patty



---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Patty-

Try this:

SELECT W1.*
FROM wo_master_IM3_Elig_enc AS W1
WHERE modify_timestamp =
(SELECT MAX(modify_timestamp) FROM wo_master_IM3_elig_Enc AS W2
WHERE W2.person_id = W1.person_id);


John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 28, 2016, at 8:26 PM, pattykf@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have a query which will not export to excel. I have been able to export the one that was created that pulled in all the patients but this one that limits the patients to the last encounter will not export. IDEAS?

SELECT wo_master_IM3_elig_Enc.*
FROM wo_master_IM3_elig_Enc INNER JOIN (SELECT person_id, MAX(modify_timestamp) AS TimeMatch FROM wo_master_IM3_elig_Enc GROUP BY person_id)  AS MaxRecord ON (wo_master_IM3_elig_Enc.modify_timestamp = MaxRecord.TimeMatch) AND (wo_master_IM3_elig_Enc.person_id = MaxRecord.person_id);



thank you

Patty




__._,_.___

Posted by: pattykf@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Re: [MS_AccessPros] too many databases open export issue

 

Patty-


Try this:

SELECT W1.*
FROM wo_master_IM3_Elig AS W1
WHERE modify_timestamp =
(SELECT MAX(modify_timestamp) FROM wo_master_IM3_elig_Enc AS W2
WHERE W2.person_id = W1.person_id);


John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 28, 2016, at 8:26 PM, pattykf@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have a query which will not export to excel. I have been able to export the one that was created that pulled in all the patients but this one that limits the patients to the last encounter will not export. IDEAS?

SELECT wo_master_IM3_elig_Enc.*
FROM wo_master_IM3_elig_Enc INNER JOIN (SELECT person_id, MAX(modify_timestamp) AS TimeMatch FROM wo_master_IM3_elig_Enc GROUP BY person_id)  AS MaxRecord ON (wo_master_IM3_elig_Enc.modify_timestamp = MaxRecord.TimeMatch) AND (wo_master_IM3_elig_Enc.person_id = MaxRecord.person_id);



thank you

Patty




__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] too many databases open export issue

 

I have a query which will not export to excel. I have been able to export the one that was created that pulled in all the patients but this one that limits the patients to the last encounter will not export. IDEAS?

SELECT wo_master_IM3_elig_Enc.*
FROM wo_master_IM3_elig_Enc INNER JOIN (SELECT person_id, MAX(modify_timestamp) AS TimeMatch FROM wo_master_IM3_elig_Enc GROUP BY person_id)  AS MaxRecord ON (wo_master_IM3_elig_Enc.modify_timestamp = MaxRecord.TimeMatch) AND (wo_master_IM3_elig_Enc.person_id = MaxRecord.person_id);



thank you

Patty

__._,_.___

Posted by: pattykf@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Minggu, 26 Juni 2016

[MS_AccessPros] Re: Help with FORM using query

 

Thanks John, you are definitely right.  That would be easier and each would have their on before update events.  I think I will go with that approach.
Thanks again John


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Rod-

In my opinion, this should be a form to edit tblQuestions and a subform to edit tblAnswers, with the Link Master and Link Child properties set to ID_Question.  When a question has no answers, all the user will see is an empty row where a new answer can be entered.  Both forms should be bound.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 26, 2016, at 9:47 PM, desertscroller@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



By "proper" fields, I am talking about the fields where the data changed; i.e. the control "strQuestion" has change and would update the strQuestion with the new info.  The query follows:

SELECT tblQuestions.ID_Question, tblQuestions.strQuestion, tblQuestions.boolActiveQ, tblQuestions.boolGraphic, tblQuestions.lngQTypeID, tblQuestions.lngQClassID, tblAnswers.lngCorrectAns, tblAnswers.Option1, tblAnswers.Option2, tblAnswers.Option3, tblAnswers.Option4, tblAnswers.Option5, tblAnswers.Option6, tblAnswers.Option7, tblAnswers.Option8, tblAnswers.Option9, tblAnswers.Option10, tblQuestions.strImage
FROM tblQuestions LEFT JOIN tblAnswers ON tblQuestions.ID_Question = tblAnswers.ID_Question
WHERE (((IsNull(tblQuestions.lngQTypeID))<>False)) Or (((IsNull(tblQuestions.lngQClassID))<>False)) Or (((tblQuestions.lngQTypeID)<1)) Or (((tblQuestions.lngQClassID)<1));

This is used to identify information missing (required info) and allows the user to insure the other information is correct (allowed to edit).

Rod



---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Rod-

Not sure what you mean by "proper" fields.  Can you post the SQL of the query that's the Record Source?

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 26, 2016, at 8:55 PM, desertscroller@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have a form which has a record source using a query of a joined of two tables.  Is there an easy way to update the proper fields on the two tables?  I was thinking using Form BeforeUpdate but not sure how it should be done.


I tried making the controls unbound and look for changes then dynamically write the update query.  However,  when I do this the text boxes are always null at the initialization of the textbox from the query.  So I am going back to bound controls.

Any suggestions on updating the fields when going to the next record in the query?
Rod









__._,_.___

Posted by: desertscroller@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Re: [MS_AccessPros] Re: Help with FORM using query

 

Rod-


In my opinion, this should be a form to edit tblQuestions and a subform to edit tblAnswers, with the Link Master and Link Child properties set to ID_Question.  When a question has no answers, all the user will see is an empty row where a new answer can be entered.  Both forms should be bound.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 26, 2016, at 9:47 PM, desertscroller@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



By "proper" fields, I am talking about the fields where the data changed; i.e. the control "strQuestion" has change and would update the strQuestion with the new info.  The query follows:

SELECT tblQuestions.ID_Question, tblQuestions.strQuestion, tblQuestions.boolActiveQ, tblQuestions.boolGraphic, tblQuestions.lngQTypeID, tblQuestions.lngQClassID, tblAnswers.lngCorrectAns, tblAnswers.Option1, tblAnswers.Option2, tblAnswers.Option3, tblAnswers.Option4, tblAnswers.Option5, tblAnswers.Option6, tblAnswers.Option7, tblAnswers.Option8, tblAnswers.Option9, tblAnswers.Option10, tblQuestions.strImage
FROM tblQuestions LEFT JOIN tblAnswers ON tblQuestions.ID_Question = tblAnswers.ID_Question
WHERE (((IsNull(tblQuestions.lngQTypeID))<>False)) Or (((IsNull(tblQuestions.lngQClassID))<>False)) Or (((tblQuestions.lngQTypeID)<1)) Or (((tblQuestions.lngQClassID)<1));

This is used to identify information missing (required info) and allows the user to insure the other information is correct (allowed to edit).

Rod



---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Rod-

Not sure what you mean by "proper" fields.  Can you post the SQL of the query that's the Record Source?

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jun 26, 2016, at 8:55 PM, desertscroller@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have a form which has a record source using a query of a joined of two tables.  Is there an easy way to update the proper fields on the two tables?  I was thinking using Form BeforeUpdate but not sure how it should be done.


I tried making the controls unbound and look for changes then dynamically write the update query.  However,  when I do this the text boxes are always null at the initialization of the textbox from the query.  So I am going back to bound controls.

Any suggestions on updating the fields when going to the next record in the query?
Rod









__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___