User Profile

Collapse

Profile Sidebar

Collapse
NigelBrown
NigelBrown
Last Activity: Mar 4 '10, 05:05 PM
Joined: Oct 1 '09
Location: London
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • NigelBrown
    started a topic UNION Query - three tables to one - error

    UNION Query - three tables to one - error

    Hi All,
    I have written the below UNION QUERY (I know its wrong but trying to show what I want to achieve) I would like all three tables to convert to one - this is only a one off every day and the result is about 400,000 rows combined. It works with two tables fine, I am not sure how to go about including the third SELECT, when I run the below code i get the error "Too many fields defined". Any help/advice would be greatly appreciated....
    See more | Go to post

  • NigelBrown
    replied to Code problem on find/copy files
    Sorry all - I have now fixed this, I combined the dates first as
    test = Fdate & "\" & Fdate1 & "\" & Fdate2 and then called test within the file path.

    Thanks
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic Code problem on find/copy files

    Code problem on find/copy files

    Hi All,

    I am having problems with the below code, it was working but as soon as I included the formatted dates as part of the file path the code now by passes the Dir$ and Ends the Sub - anyone know whats going worng please

    [Code=vb]

    Private Sub Command0_Click( )

    Dim Fdate As String
    Dim Fdate1 As String
    Dim Fdate2 As String
    Dim S As String


    Fdate...
    See more | Go to post

  • NigelBrown
    replied to Dlook Up against a query
    Actually all,

    I have written the beow in a select query but it errors, banging my head against the wall, does anyone have any ideas please ?

    GroupOwner: DLookUp("[GroupOwner]","[tbl_GroupOwners _Master]","[Group Mapping] =" & Nz([GroupMapping],0))

    I have two tables in my select query "table A that contains [GroupMapping] and tbl_GroupOwners _Master.

    Thanks...
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic Dlook Up against a query

    Dlook Up against a query

    Hi all,

    I have the below code but cannot get it to work, missing operator ?
    [Code=vb]
    GroupOwner1 = DLookup("GroupO wner", "tbl_GroupOwner s_Master", "Group Mapping = ???")
    [/Code]

    the problem I have is where I have the ????, I want this to refer to a column in a query called GroupMapping, is this possible. I want to open the query and call the function which in turn...
    See more | Go to post

  • NigelBrown
    replied to Find in string and
    Thanks Nic, should have known that myself - been staring at this far to long - going to take a break I think. Thanks again
    See more | Go to post

    Leave a comment:


  • NigelBrown
    replied to Find in string and
    Hi Guys,

    Thanks you both for your answers, both work well, have a quick question, tried to do it myself but can this be modified to dismiss any fields that do not contain any ":" ? - at the moment it either returns the first 8 char with first option, or using the Function it will Error. I have tried writing an imbedded IF statement (i.e. IF(Instr[filed1],1=";", etc ) but cannot solve this. Appreciate the help...
    See more | Go to post

    Leave a comment:


  • NigelBrown
    replied to Find in string and
    no worries - got it to work - just took the vbtextcompare out. Thanks for this saved me a lot of time
    See more | Go to post

    Leave a comment:


  • NigelBrown
    replied to Find in string and
    Thanks msquared,
    any chance I could put this in a query, dont really want to create a function but will do if it is the best way. I only need to perform this once a day on import for about 50 rows and was trying to just put an make table query on it.
    Thanks
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic Find in string and

    Find in string and

    Hi,

    Would anyone now how to write an instr that would grab only the date from the string below (i.e between the 2 colons)

    I have tried multiple times to get this to work to no avail, the colons will NOT always be at character 14, so need to find first ":" then grab the next 8 caracters.

    USINAS SID MI:30/12/09:0.3072:85

    i would like to achieve the result

    30/12/09...
    See more | Go to post

  • NigelBrown
    started a topic Folder path error

    Folder path error

    Hi All,
    Hope this is the right forum for this, I have written the below code but the specific file will not open under mFolder1 - any ideas as to what I have done wrong ? really appreciate it - I get "run time error 1004 Method'OpenText ' of object 'Workbooks' failed"

    [Code=vb]
    Sub RunRec()

    Dim mToday As Variant
    Dim mFolder As String

    mToday = Date
    Do
    ...
    See more | Go to post

  • NigelBrown
    replied to Import File issue
    Hi All,

    Does anyone know how to get the Docmd.Transfer to work regardless whether it is a txt or xls file ??? I would like both - also is it possible to not have a file name ? the file name I would be selecting changes daily (i.e. nigel_221209)

    Thanks
    See more | Go to post

    Leave a comment:


  • NigelBrown
    replied to Import File issue
    Thanks Mike, cannot beleive I did not see that !!! - works now just need to resolve the docmd piece.
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic Import File issue

    Import File issue

    Hi All,
    I have the below code but have a couple of problems that I cannot solve, firstly when I select a file the dialog box will promt me to select the file a second time then import, even though it works would like it to import on first select ? also would anyone know how I would write this so it can either import a xls or a txt file depending on file type ? the xls import works fine but when i change it to the acImportDelim it will not...
    See more | Go to post

  • NigelBrown
    replied to VBA help
    sorry guys - wont happen again - the initial prob was that the code worked when it was only 1 If statement, but as soon as I included 2 or 3 it failed to work. Not to worry though i found another way of doing this which actually works better. - Thanks though.
    Nigel
    See more | Go to post

    Leave a comment:


  • NigelBrown
    replied to VBA help
    hi linq,

    sorry - they are text boxes, the value in them is derived from a Function which calculatewhen the form is opened "On Open". the code above I intitally had in the On Click, i.e when i click the button - if all three text boxes do not equal yes then I do not want it to run some code that appends/deletes data.
    Thanks for the help
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic VBA help

    VBA help

    Hi,

    I am trying to get the below code to work, any ideas how I am writing this incorrectly. Apologies if this is obvious - ripping my hair out

    [Code=vb]
    If (Me.Text12 = "No") And (Me.Text14 = "No") And (Me.Text16 = "No") Then
    MsgBox "You cannot match these items, Mis-balance! Change selection!"

    Exit Sub
    Else
    [/Code]

    Th...
    See more | Go to post

  • NigelBrown
    replied to Refresh another Form
    Hi AJ,

    No they are two independant forms, the only reason I did not do a subform is becuase I need to see both as continuous. one form changes a calculation after filters are applied, i would like another text box in a another form to pick this up everytime a filter is changed (general idea) - if you have a better way of doing it then please advise
    See more | Go to post

    Leave a comment:


  • NigelBrown
    started a topic Refresh another Form

    Refresh another Form

    Hi All,

    I am trying to refresh a textbox in form A while in Form B from an OnClick (both forms are open at the same time) - I want to write the below function but do not seem to be able to get this right. I have tried Requery but it does work ?

    need something like

    [code=vb]
    [Forms]![tbl_Ronnie_Mast er]![Textbox].Refresh
    [/code]

    any help/advise will be appreciated
    Th...
    See more | Go to post

  • NigelBrown
    replied to Formula help
    Thanks ChipR - the only thing I did not try !!!!!
    Thanks again
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...