Fill in value

C

CJ

Hi Groupies

I am using the code for Sandra Daigle's list box transfer.

I would like to change it so that when you remove an item
from the table on the right, it does not remove it from the
underlying table. Instead, I would like a field to be filled in with
a date. I can not seem to get the code right.

Here is a snip:

<snip>
For Each varItem In Me.lstOnSite.ItemsSelected
strwhere = strwhere & "[SKU Number]='" & Me.lstOnSite.ItemData(varItem)
& "' Or "
Next varItem
strwhere = Left(strwhere, Len(strwhere) - 4)

' I think this line below is the one that needs to change

strSql = "Delete * from tblWorkOrderDetails where_
[Work Order ID]=" & Me.txtWOID & " AND (" & strwhere & ");"

db.Execute strSql
Set db = CurrentDb
Set rst = Nothing
Set db = Nothing
Me.lstOnSite.Requery
Me.lstTruckInventory.Requery
<snip>

So, instead of having the data deleted from tblWorkOrderDetails
I would like the field dtmDateIn to be filled in with the date
from this form, frmTruckSite and the field txtDate.

I'm sure it can be done, I just have no clue how.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top