I have tried several ways with no success to close the connection to my
datasource. The following code is used to open the datasource and populate
an MS Datagrid.
frmA.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\PlantMonitor1\Data\encoreiq.mdb;" & _
"Persist Security Info=False;Jet OLEDB:Database"
frmA.Adodc1.CommandType = adCmdText
frmA.Adodc1.RecordSource = "select LotJob as Lot, warehouse as [W/h], Bin,
creationdate as [Date Rec], " & _
"qtyonhand as [On Hand], [qtyonhand] - [qtytoship] as [Qty Free],
lotholdflag as [On Hold], Note, QtytoShip as [Ship Qty], " & _
"iif(isnull([ExpiryDate]),'',[ExpiryDate]) as [Expiry Date], lasttrndate as
[Last Transaction] from dbo_lotDetail where " & _
"stockcode = '" & Usc & "' and qtyonhand <> 0"
Set frmA.DataGrid1.DataSource = frmA.Adodc1
frmA.DataGrid1.Refresh
Tim
>> Stay informed about: Close Connection