Thread has moved to
Re: Repost - Fill in value *Sandra Daigle List Box Edit
CJ --------------------------------------------------------- Know thyself, know thy limits....know thy newsgroups! "CJ" <private[ at ]newsgroups.com> wrote in message news:C25C9EAF-DF80-4BE7-AE8D-EEF436A4C3B6[ at ]microsoft.com...
[Quoted Text] > 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. > > -- > Thanks for taking the time! > > CJ > --------------------------------------------------------- > Know thyself, know thy limits....know thy newsgroups! >
|