Auto column update from a drop down on a subform

munkeyroot

Registered User.
Local time
Today, 20:14
Joined
Jan 13, 2011
Messages
76
Hi all

I hope someone can point me in the right direction, I am a little lost on this one. i hope i explain this correctly :) and sorry my VB is not so good

I am Trying to Create a Job Sheet and I have a Form "Main Sheet" which has 2 combo boxes System and Part Type, these are populated by a "Part_List". they are set to filter from the System and Part Type from the Parts list.

On the "Main Sheet" Form i have a subform made from "Order" table, this has in Item Combo box "Item Desc" which is filtered by the system and Part Type.

On the Subform (datasheet view) i also have the Part code and costings Columns etc.

I am trying to get the rest of the subform row to Auto update from the selection i make in the "Item Desc" However any changes i make do not seem to affect the rows.

I have tried to include the part code etc on the Item Desc CboBox so then i could pickup the column number on an afterupdate Part_Code = Item_Desc.column(3) but again nothing happens or even tried a Dlookup and also a Query still no joy.

yet i may be looking at this totally wrong :)

i hope this makes sense

cheers Munk
 
afterupdate Part_Code = Item_Desc.column(3) is correct and should work.
IF
Item_Desc.column(3) is the 4th column in combo.
in vba, columns begin with zero, so the item you show is in column 4 of the query.
if all this is correct, then something else is wrong.
 
Hi Ranman

Thanks bud, i have just gave it a go, yeah still no change fella..this is puzzling.

i'll put the DB up for you chap, i prob have it all wrong lol

cheers munk
 

Attachments

normally, you pick the PART# combo ,then THIS fills in the description. (not the other way)
but you can do it this way,
this descrip combo will not work unless PARENT form part type is filled. (works)
but your combo box is set to 3 columns, so the part# is in col 3, so in vb this is cboBox.columns(2)

the width of cboDescr is short, set the columnwidths property= 3";1";1"
and listWidth prop = 5
 
Hi Ranman

thanks for the info bud, just applied the changes you have suggested, the part number now displays, however i am getting an issue that it will not let me move to the next row in the subform. I've popped some screen shots on for you mate.

thanks again for your help Ranman

Munk
 

Attachments

  • subformupdateissues.jpg
    subformupdateissues.jpg
    78.3 KB · Views: 65
  • subformupdateissuesVB.jpg
    subformupdateissuesVB.jpg
    86.3 KB · Views: 72
Hi Ranman
scratch my last message managed to sorted it i didn't realised i had a SQL qury on the table for the ITem Desc .....ohhhhh rookie mistake lol

thanks chap for your all help

munky
 

Users who are viewing this thread

Back
Top Bottom