|
-
May 31st, 2002, 03:01 PM
#1
Thread Starter
Fanatic Member
SQL help, joining tables
I have the following code:
VB Code:
rs2.Open "SELECT f.cost_per_meter, fu.length_used FROM fabric f, fabricused fu WHERE f.fabricno = fu.fabricno AND fu.garmentno = " & garmentid, conn
Now how would I put cost_per_meter/len_used in to a variable, I've tried
cpm = rs2!f.cost_per_meter
cpm = rs2.fields("f.cost_per_meter).value
and a few other variation to no avail... can anyone help me out here.
If wishes were fishes we'd all cast nets.
-
May 31st, 2002, 03:14 PM
#2
Frenzied Member
cpm = rs2.fields("f.cost_per_meter")
should work fine.....or if you wanted to format to currency
cpm = Format(rs2.fields("f.cost_per_meter"), "Currency")
-
May 31st, 2002, 03:27 PM
#3
Lively Member
Code:
cpm = rs2("cost_per_meter")
The name of the table is not included in the name of the field.
-
May 31st, 2002, 05:29 PM
#4
Thread Starter
Fanatic Member
hrm getting "Either EOF or BOF is true, or record deleted..." error
If wishes were fishes we'd all cast nets.
-
May 31st, 2002, 05:30 PM
#5
Thread Starter
Fanatic Member
ah nm something is wrong it my sql statement
If wishes were fishes we'd all cast nets.
-
May 31st, 2002, 05:36 PM
#6
Thread Starter
Fanatic Member
Got it working thanks for the help
If wishes were fishes we'd all cast nets.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|