Select....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI let say I have all the information I need in the recordset, if I need to
look for the # of Purchase Order to add to the order when is included, do I
need to do another SELECT….. to the number of the PO and put the PO number
in the recordset and lost all the information I have there or there is
another way to do it.

Another question is why this select is not working I just want to find the
record 1, CorrelativNum is numeric.


Sql = "SELECT tblCorrelativ.CorrelativNum, tblCorrelativ.CorrelativID, " & _
"FROM tblCorrelativ WHERE CorrelativNum = " & 1 & ""


Thanks
 
Hi Orlando,

In answer to your first part, I don't understand why you are losing all your
information. You should simply be able to enter the information you require.
If you are talking about two tables that are linked via a PK/FK pair in a
relationship, simply use a main form/sub form pair to handle it, remembering
to set the Link Child Field and Link Master Field properties.

In relation to your second question, you have an extra comma in your SQL
string, therefore it will never work. Remove the comma before the word FROM.

eg: Sql = "SELECT tblCorrelativ.CorrelativNum, tblCorrelativ.CorrelativID "
& _
"FROM tblCorrelativ WHERE CorrelativNum = 1"

Hope this helps.

Damian.
 
Back
Top