Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel to access
I am trying to get excel to have a drop down menu with a list of products
allowed for a particular job, so say i wanted to order a light switch and i needed 4 of them it would read 120 volt light switch then quantity 4 then automatically take that and place it in access, for ordering, can anyone help me |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel to access
Option Explicit 'Using Excel 2000 here 'Reference: Microsoft ActiveX Data Objects 2.8 Library '- In Sheet1 is a DropDown, called: DropDown_Products '- The quantity is in Cell F4 '- There is a CommandButton, called Button_Process ' to export both product and quantity to an Access ' database called ORDERS.mdb '- ORDERS.mdb has two columns: Product & Quantity Private Sub Button_Process_Click() Dim dc Dim db Set dc = CreateObject("ADODB.Connection") dc.Provider = "Microsoft.Jet.OLEDB.4.0" dc.Open "C:\ORDERS.mdb" Set db = CreateObject("ADODB.Recordset") db.Open "ORDERS", dc, adOpenDynamic, adLockOptimistic, adCmdTable db.AddNew db.Fields("Product") = DropDown_Products.Text db.Fields("Quantity") = Cells(4, 6).Value db.Update db.Close dc.Close Set db = Nothing Set dc = Nothing End Sub '- Play around :) "im new to all this" <im new to all schreef in bericht ... I am trying to get excel to have a drop down menu with a list of products allowed for a particular job, so say i wanted to order a light switch and i needed 4 of them it would read 120 volt light switch then quantity 4 then automatically take that and place it in access, for ordering, can anyone help me |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I access the access data via Excel 2002 with auto update ? | Excel Programming | |||
Importing data from Access to Excel, but I need to vary the table from Access | Excel Programming | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
Access data -work in Excel- save in Access | Excel Programming | |||
Getting Access Error Messages when running Access through Excel | Excel Programming |