SQL Hates Modules

  • Thread starter Thread starter Guest
  • Start date Start date
Antoine said:
Hi!

My name is Antoine Dubuc, and I am working on a good CRM.

Here is a rather simple question that has yet to be elucidated by my
modest
programming skills.

In this post:
http://www.utteraccess.com/forums/s...1191944&page=0&view=collapsed&sb=5&o=&fpart=1

I have included at the bottom the actual CRM I am working on.
There is something going on here that defies my textbooks and friends.

Please help!!

I am assuming you have redacted some of your code from the CRM at the link?
Otherwise, I don't see where you assign SQL3 to rsNavigateOrganisation.

------------------
In this sql phrase:
SQL3 = "SELECT * FROM Organisation WHERE Organisation.OrganisationName = " &
whereTo & ""
Should there be quotes around the whereTo?
Are they assigned when passed in to the NavigateOrganisation function?
ie: if whereTo is passed in as myOrganisation, would the SQL3 then be:
SELECT * FROM Organisation WHERE
Organisation.OrganisationName = myOrganisation
or
SELECT * FROM Organisation WHERE
Organisation.OrganisationName = "myOrganisation"

I'm just thrown a bit by your inclusion of the & "" after the whereTo in the
SQL3 assignment.
In the first case, it will think that myOrganisation is a number and will
fail, but I don't recall what the error would be.
 
Hi!

Thank you for your response. I am the author of this CRM. (Yay! My first
real project!) :)

So, em, I was lost. I went to play pool to clear my mind. And it worked. I
had forgotten the Option Explicit at the top that somehow got deleted. And
after putting it back, it worked -after some trudgery on my part...

Thank you again for your response, it is good advice to put ' ' for my
variables.

Best regards,

Antoine
 
Back
Top