Search results

  1. S

    vba loop through pivots

    thanks chergh, second way worked a treat.
  2. S

    vba loop through pivots

    Hi All, I'm trying to loop through some pivots in excel from access vba. the top refresh of my code works (if i hardcode in the pivot name) the second refresh gives an error (passing the pivot name into a variable) Dim pvt As PivotTable For Each pvt In xlSht2.PivotTables...
  3. S

    dynamically create sql string

    perfect, thanks whoot.
  4. S

    dynamically create sql string

    Hi all, I'm trying to create a sql string which i want to use mre than once by using values from arrays. i have this... sql = "select * from '" & query_name(iQuery) & "' " & _ "where courier = '" & Courier(iCourier) & "' " & _ "and [Claim Type] in (""" & claim_type(iClaim_Type) & """) "...
  5. S

    Lock cells with values only

    ** updated I've now got it down to this with a function. crake and james - i couldn't do it on the after update event because by that time the user has already made changes?? Private Sub txt_weight_GotFocus() 'call the lock field function lock_field Me.txt_weight End Sub Public Function...
  6. S

    Lock cells with values only

    solved it with.... Private Sub length_GotFocus() If Me.length.Value > 0 Then Me.length.Locked = True Else Me.length.Locked = False End If End Sub
  7. S

    Lock cells with values only

    Hi all, i have a subform thats set up as... Stockcode, Qty, length, width, height, weight ...This info comes from a user typing in a stockcode then click add. at that point i look up the stockcode aganist a linked table. If the info is found the i bring back the dimension details and multiply...
  8. S

    merge cells

    I use the following code to output a table then format the sheet. it's just an example. when i use the merge part in excel vba of the wb it's fine but when i bring it across to access vba it doesn't merge. Public Sub output_to_excel() 'create file path Dim XLpth As String XLpth =...
  9. S

    merge cells

    Hi All, I'm trying to merge some cells in excel from access vba. I've tried a few different ways now and nothing seems to work. Here's what i've got... xlSht1.Range("A2:C2").Merge xlSht1.Range("A2:C2").MergeCells = True xlSht1.Range("a2:C2").Merge Across:=True xlSht1.Range(xlSht1.Cells(2, 1)...
  10. S

    sort value list listbox

    thanks david, i managed to use what you gave me and get my list box to sort by date. chuffed :)
  11. S

    sort value list listbox

    thanks david, how do i pass a table into a function??? i have this so far: Public Function ListFiles(strPath As String, Optional strFileSpec As String, _ Optional bIncludeSubfolders As Boolean, Optional lst As ListBox, Optional ByVal tmp_tbl As TableDefs) used lik this: Call...
  12. S

    sort value list listbox

    Hi All, I have a list box set to value list which i have filled with the files of a directory (where i send reports). so it looks like this: Date..........Title......................Ext........actual path(this is hidden) 12.10.09.....Report Name...........pdf........c:\blah blah\date Report...
  13. S

    save prompt

    ok, so i've found this Dim dlgSaveAs As FileDialog Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs) dlgSaveAs.Show ..how do i get the file they have saved into a variable so i can use it to pass the query to?? thanks. :)
  14. S

    save prompt

    Hi All, I have a button on a form which exports a query to excel. i want to be able to give the user a prompt as to where the file should be saved instead of having it fixed in the code. here's what im using... 'check file already exists and if so then delete it. pth = GetXcelPath &...
  15. S

    delete database

    spot on. thank you.
  16. S

    delete database

    Hi, i'm trying to delete a database using vba?? i have run some code to compact the db (which creates a new version). i then want to delete the old version and rename the new one. how do i go about deleting a db using vba? thanks spin
  17. S

    edit macro from form

    hi David, I know this is a 'bit' risky but it's just myself and a colleague who are using the database. The macros are responsible for opening other dbs (usually with an auton exec macro) or file copying etc. I also need to be able to create a new macro by clicking a button when it's a new...
  18. S

    edit macro from form

    Hi all, I am creating a scheduling db. I have a form that displays all the schedules and within a scheduled task there will most likely be a macro. I want to have a button by the side of the macro name field that when clicked opens up the macro for editing. is this poss'??? thanks, spin.
  19. S

    Lotus password??

    Hi All, i am trying to import some data from a lotus notes db. problem i'm having is that every time i run the code i get a password prompt. this is what i'm trying... Dim s As New NotesSession Call s.Initialize("cheque") ..but i still get the prompt. can anyone help. thanks. spin.
  20. S

    Mouse Roller Ball??

    thanks gemma. will have a try at it and see what happens. :)
Back
Top Bottom