Posts by stevehorton09

    sorry simply a typing error.

    It does hold values and works perfectly.

    Ok so now i can enter info into excel and then it is input into an access table, which is great.

    Is it possible for that data to then be queried through excel. I.e i wanted to find local account 123 so i would click a button enter the local account and then it would download the record to say sheet 1 or i could download all records to sheet 1?


    i have made the change but it is saying items cannots be found in collectios corresponding to the requested name or ordinal and when i push debug, it shows this line

    .fiels("Company name") = localaccount1

    does anyone know why? :(

    Still not sure about this.....

    Hi im getting the following error, wrong number of arguements or invalid property assignment

    any ideas :) below is the code im using

    Private Sub CommandButton4_Click()
    Dim cnt As ADODB.Connection
    Dim rst As ADODB.Recordset
    Dim stDB As String
    Dim stCon As String
    Dim i As Long

    'Instantiate the ADO COM's objects.
    Set cnt = New ADODB.Connection
    Set rst = New ADODB.Recordset

    'Pathway and name of the database
    stDB = ThisWorkbook.Path & "\" & "supplier.mdb"

    'Create the connectionstring.
    stCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & stDB & ";"

    'Open the connection
    cnt.Open stCon

    'Open the recordset and You need to change to the
    'correct table name.
    rst.Open "customers", cnt, 1, 3, adCmdTableDirect, _
    adLockReadOnly, adCmdTableDirect

    'Add the new record and You need to change the name
    'of the fields.
    With rst
    .Fields("Company Name") = combobox1_input

    End With

    'Close the recordset and close the connection.

    'Release objects from memory.
    Set rst = Nothing
    Set cnt = Nothing

    Unload Me
    End Sub

    `hi all,

    i was wondering about having a userform from excel with its data feeding into an access table. Is that possible? I expect the answer is yes but......

    at present my userform enters simply into a spreadsheet behind it

    i.e textbox1 = a1 etc.

    I have unfortunately cant attach my current workbook but if you email at [email protected] i will send it to you and if anyone can tell me how this can be done i would be most appreciative

    I have specified the current code below aswell if that helps.
    I have really only used access back in my uni days so i need some help here!

    If anyone can help me, i have a spare google acccount or two! (gmail).
    thanks in advance


    Worksheets("Sheet4").Range("b13").Value = combobox1_input
    Worksheets("Sheet4").Range("b14").Value = combobox2_input
    Worksheets("Sheet4").Range("b15").Value = LocalAccount1.Text
    Worksheets("Sheet4").Range("b16").Value = Description1.Text
    Unload Me

    Hi guys,

    I need a msgbox with a yes or no function.

    I know how to get this far MsgBox("blah blah blah", vbYesNoCancel, "Last Request?")

    But im lost now! I want the yes to close the spreadsheet and the no to open a spreadsheet (e.g c:\s)

    How is this done, not ,much experience with msgbox 's

    Hi there,

    I currently use this code for someone to enter a password before carrying on.

    MY_ENTRY = InputBox(" Please could you enter the Approver Password APPROVERS ONLY! If you are not an approver press cancel", "MACRO PROTECTION")
    MY_ENTRY = InputBox(" Please could you enter the Approver Password APPROVERS ONLY! If you are not an approver press cancel", "Approver Only")
    If MY_ENTRY <> "54321" Then Exit Sub

    Is there a way that when person enters the password it shows instead of 54321, *****?????????



    I have a module that i want to run by the click of a button.

    "run.application" is what i need but how do i pair the module with this.

    The module name is "Send_rows"

    Any help would be appreciated

    what basically happens is.............

    The gl maintenancev2 has the module but my macros saves the sheet to a variable name which is never the same hence, i need it to work in the active worksheet.

    Is that possible as the name of the spreadsheet will never be the same !!:)

    Hi all,

    I have been given this code by a friend but i do not want it to always look in this sheet.

    I have saved the module (send_rows) on a new spreadsheet.

    How can i just make it run from a button in whatever sheet it is in?

    I.e aslong as send_rows is saved in the modules of a spreadsheet i can run it!

    Sub LocalUse_Button2_Click()
    Application.Run "'GL Maintenance Systemv2.xls'!Send_rows.Send_rows"
    End Sub

    Hi guys,

    does anyone know how to copyright a program within the souce code?

    I have created a program and want to put copyright on the code but im unsure on how to do this?

    any help would be appreciated

    Hi everyone,

    how can i have a minimum value to a cell i.e you have to enter 6 digits

    my current code stops someone entering a letter and the max length is set in the vb properties but now im lost!!

    my code:

    Private Sub GlobalAccount1_Change()
    Dim TbCheck

    If TbCheck = IsNumeric(GlobalAccount1) Then
    MsgBox "This is an invalid entry! Please delete and retype a number "
    End If
    TbCheck = IsNumeric(GlobalAccount1)
    End Sub