Help!

update table with multi select

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  disable esc key on compact and repair  
Author Message
Len-80
External


Since: Nov 03, 2009
Posts: 1



PostPosted: Tue Nov 03, 2009 11:38 am    Post subject: update table with multi select
Archived from groups: microsoft>public>access (more info?)

I hope im in the right group please advise if i am not.

I am trying to create records for tracking items on table SDI ORDERS.
what ive done:
I have table SDI INVENTORY and table SDI ACTIVITIES, both are related to
table SDI ORDERS. with Enforced Referential Integrity. I made a form from
table SDI ORDERS. Also called SDI ORDERS. In this form i have a multi select
list called VESSLENAME. then i have Combo boxs:
"DeliverySR",CompanyName,"Activity". and Text boxes
"VESSLENAME",DeliverySR,CompanyName,Activity. I have gotten this far from
advice i read off a post by Klatuu. I have added a command button26 and on
its on click event there is code:

Private Sub Command26_Click()

Dim ctl As Control
Dim varItm As Variant

Set ctl = Me.VESSELNAME
For Each varItm In ctl.ItemsSelected

DoCmd.GoToRecord , , acNewRec
Me.txtVessleName = ctl.ItemData(varItm)
Me.txtActivity = Me.Activity
Me.txtCompanyName = Me.CompanyName
Me.txtDeliverySR = Me.DELIVERYSR
'Debug.Print ctl.ItemData(varItm)

Next varItm
Set ctl = Nothing

I am getting run-time error '2105' "you cant go to specified record."

What i want it to be able to select all vessels that were delivered to a
customers site with the Service Request number and activiy are al lthe same.
that way i can keep track of what vessles have been where. obviously i am new
at code please help!
Back to top
Len-80
External


Since: Nov 04, 2009
Posts: 1



PostPosted: Wed Nov 04, 2009 1:58 pm    Post subject: RE: update table with multi select [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Len-80" wrote:

> I hope im in the right group please advise if i am not.
>
> I am trying to create records for tracking items on table SDI ORDERS.
> what ive done:
> I have table SDI INVENTORY and table SDI ACTIVITIES, both are related to
> table SDI ORDERS. with Enforced Referential Integrity. I made a form from
> table SDI ORDERS. Also called SDI ORDERS. In this form i have a multi select
> list called VESSLENAME. then i have Combo boxs:
> "DeliverySR",CompanyName,"Activity". and Text boxes
> "VESSLENAME",DeliverySR,CompanyName,Activity. I have gotten this far from
> advice i read off a post by Klatuu. I have added a command button26 and on
> its on click event there is code:
>
> Private Sub Command26_Click()
>
> Dim ctl As Control
> Dim varItm As Variant
>
> Set ctl = Me.VESSELNAME
> For Each varItm In ctl.ItemsSelected
>
> DoCmd.GoToRecord , , acNewRec
> Me.txtVessleName = ctl.ItemData(varItm)
> Me.txtActivity = Me.Activity
> Me.txtCompanyName = Me.CompanyName
> Me.txtDeliverySR = Me.DELIVERYSR
> 'Debug.Print ctl.ItemData(varItm)
>
> Next varItm
> Set ctl = Nothing
>
> I am getting run-time error '2105' "you cant go to specified record."
>
> What i want it to be able to select all vessels that were delivered to a
> customers site with the Service Request number and activiy are al lthe same.
> that way i can keep track of what vessles have been where. obviously i am new
> at code please help!
>
>
>
>
> Hi all i was able to fix this issue. Turns out my combo boxes on the form had to be unbound to work correctly. Case Closed
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum