Search:

Type: Posts; User: malik641

Page 1 of 6 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: VB.NET & Access - insert data into normalized tables

    Maybe I am not looking up the correct keywords.

    search criteria (couple examples):
    insert into normalized tables
    insert into multiple tables
    (I also tried adding VB.NET and MS Access and it...
  2. [RESOLVED] VB.NET & Access - insert data into normalized tables

    I can't seem to find any good information on this subject.

    Application details:
    VB.NET windows form front-end
    MS Access 2007 database back-end

    In the MS Access database I have a couple of...
  3. Replies
    9
    Views
    813

    Re: school assignment problem.

    Wakathiro,

    You have rowNum declared in the Find_Click() procedure and also defined in a separate module as a global variable. The problem is, when you execute that code (Find_Click) it declares...
  4. Replies
    9
    Views
    813

    Re: school assignment problem.

    Change your IF statement to:

    If CLng(IDnumber) = Sheets(1).Cells(rowNum, 5).Value Then

    And change rowNum and LastRow to type Long, not Integer (integers are not large enough to handle the...
  5. Replies
    9
    Views
    813

    Re: school assignment problem.

    Can you please attach the file with the changes you made from my post? I'd like to see how you interpreted my previous post.

    Be sure to read my previous post carefully. I talk about your algorithm...
  6. Replies
    9
    Views
    813

    Re: school assignment problem.

    Hi wakathiro,

    Your biggest problem lies in this line:

    'Set record number to starting row
    Sheets(1).Cells(rowNum, 5) = IDnumber


    The problem is Sheets(1).Cells(rowNum, 5) assumes the...
  7. Re: Subtracting values from row in string

    Public Sub TryMe()
    Dim rngStart As Excel.Range
    Dim rngLast As Excel.Range

    Set rngStart = Cells.Find(What:="top institutional holders", After:=ActiveCell, LookIn:= _
    ...
  8. Re: Subtracting values from row in string

    Just subtract it from the getgo:

    strRange = Range("A1:A" & (lngLastRow - 2)).Address

    Or do you mean subtract 2 from both rows?
    Could you post the relevant code you're working with?
  9. Replies
    3
    Views
    4,557

    Re: Excel VBA HyperLink Error

    No problem. Glad to see you got it going :)
  10. Replies
    3
    Views
    4,557

    Re: Excel VBA HyperLink Error

    I don't think you can set up hyperlinks in that way. The problem is that Excel will check if the hyperlink has a valid address BEFORE ever entering into the _FollowHyperlink event. And if your...
  11. Replies
    3
    Views
    15,890

    Re: Excel Cell Font Color Programatically

    Cells(x,y).Font.Color returns 255 for red for me, and 0 for black.

    When you deal with the Color property, it returns an RGB color code that you can split apart using a method found on Chip...
  12. Re: Excel: Generalized _Click Sub for UserForm Fields

    Hey no problem :)

    Sometimes, yeah, you do. But I still think there's a better way...just can't see it yet. I'll post back if I ever think of it.
  13. Re: Excel: Generalized _Click Sub for UserForm Fields

    Forgot to mention you could also use Replace() function in the exact same manner. Replace() function is probably faster since it's native to VBA (VBA.Replace())
  14. Thread: Useless code?

    by malik641
    Replies
    5
    Views
    466

    Re: Useless code?

    I don't know about the formatting issue (though I've heard about them), but you could use the following code to speed things up if that's your concern:
    Note: Untested

    Dim Arr As Variant
    Dim rng...
  15. Re: Excel: Generalized _Click Sub for UserForm Fields

    Hey guaranine,

    A few notes on your code first:

    'Convert Hex String to Binary
    For i = 1 To OldLen Step 1
    If (Mid(HexNum, i, 1) = "0") Then HalfByte = "0000"
    If...
  16. Replies
    3
    Views
    433

    Re: [RESOLVED] Get external data query

    My pleasure :)
  17. Replies
    3
    Views
    433

    Re: Get external data query

    Hi,

    Try Setting .FieldNames = False

    HTH
  18. Re: Excel: Generalized _Click Sub for UserForm Fields

    Hey there guaranine,

    I'm sorry, but I'm having the hardest time trying to implement this Class module example. Apparently the OptionButton OLEObject does not support the set of events (An error I...
  19. Re: Excel: Generalized _Click Sub for UserForm Fields

    Hey,

    I have a feeling you can get this to work with formulas and user-defined functions. You already have the OptionButtons linked to cells, you can just use those values to perform your...
  20. Re: Word: Generalized _Click Sub for UserForm Fields

    That's ok. I think I see what's going on. I've got to get going, but I'll try to post later tonight. In the meantime, could you please provide a sample workbook or what you're exactly doing? And by...
  21. Replies
    15
    Views
    15,460

    Re: VBA set printer

    From what I found online apparently that method is for Access 2002 and later...
    Otherwise I assume you have to use a numeric index (Long type I believe).
  22. Re: Word: Generalized _Click Sub for UserForm Fields

    What do you mean actual userform? If you're using a Userform in the VBE, then Me.Controls exists inside the Code behind the Userform.
  23. Re: Word: Generalized _Click Sub for UserForm Fields

    You could use a Class module to collect all the controls you want to have the same _Click event at runtime. Check out this thread.

    Even though it's in Access you probably won't have to modify...
  24. Re: Word: Generalized _Click Sub for UserForm Fields

    Hi,

    You can do that no problem. Just create you generalized procedure, and for each _Click event for each control you want to use this procedure for, just Call the procedure from that _Click event...
  25. Replies
    2
    Views
    389

    Re: filling in two non-adjacent cells

    I'm sorry, but no, I don't. Could you post an example workbook? Or maybe all the relevant code you have now?

    As long as there's a consistent logic to these values you're sure to get an answer.
  26. Replies
    4
    Views
    457

    Re: Comparing Arrays

    Yep. More looping involved here.

    I know this is probably not the best way to do this, but hey, it worked!


    Option Explicit

    Public Sub ArrayDifference(ByRef Arr1() As String, _
    ...
  27. Replies
    4
    Views
    457

    Re: Comparing Arrays

    It would probably take longer. To write and during runtime. I'm not sure at the moment how I would do it using only arrays....hmm...
  28. Replies
    4
    Views
    457

    Re: Comparing Arrays

    I would use Scripting.Dictionary objects for this:

    Option Explicit
    ' Add Reference to Microsoft Scripting Runtime
    Public Sub ArrayDifference(ByRef dict1 As Scripting.Dictionary, _
    ...
  29. Re: Confusion with SQL statements in different ADODB connection strings

    Interesting. I tried -1 for True and it didn't work, but then I tried 1 for True and it worked.


    Thanks a lot Mazz1 :) Problem solved!
  30. Re: Confusion with SQL statements in different ADODB connection strings

    ** -1=True **
  31. Re: Confusion with SQL statements in different ADODB connection strings

    I'm not sure how I can determine that because I don't have access to a GUI for the SQL Server database...just the MS Access front end, which is just a check box. What is true and false in byte...
  32. Re: Confusion with SQL statements in different ADODB connection strings

    When I use the double apostrophes ('') I get the following error:



    The query used:

    UPDATE TItems SET TItems.DwgPath = '\\Ntserver2\controlled doc''s (released)\Drawings\Signed Drawings...
  33. Re: Confusion with SQL statements in different ADODB connection strings

    Ok. Tried out the single apostrophes and I'm having a problem with it because the file path I'm trying to perform the query on contains an apostrophe in it like "\\MyServer\Path's Path\File.file". I...
  34. Re: Confusion with SQL statements in different ADODB connection strings

    Thanks for the reply techgnome. :) No the fields do not have any spaces in them, so that wouldn't be it.


    Hi brucevde,
    That sounds like that would do it. Especially because the query errors out...
  35. Re: Confusion with SQL statements in different ADODB connection strings

    Bump. Still can't figure this one out. Anybody have any ideas?
  36. [RESOLVED] Confusion with SQL statements in different ADODB connection strings

    Hey guys,

    At my company, we have a SQL Server 2000 database back-end with an MS Access front-end and I'm performing an update query on a table called TItems. Here is the procedure I have now that...
  37. Re: I know, it will be a stupid question, however...

    Forgot to mention it will change the values in the text boxes instead of labels
  38. Re: I know, it will be a stupid question, however...

    I meant the return value for Val() in your procedure. Because in your original procedure if you have 33.333,25 you would end up with 33.333 and I thought you might want something different.
    Anyways,...
  39. Re: I know, it will be a stupid question, however...

    What about something like:

    Private Sub Command1_Click()
    Dim Index As Integer
    Label1.Caption = _
    Val(Replace(Replace( _
    (Replace(Text1(Index).Text, ",", "|") _
    ...
  40. Re: [RESOLVED] SQL Query - Problem with CASE and IIF() statements

    Florida's been raining a lot lately, but we needed it.
    Good luck with the new job! Hopefully the previous person knew what they were doing!! ;)

    Here's a small example as promised :thumb:
    Enjoy...
Results 1 to 40 of 221
Page 1 of 6 1 2 3 4



Click Here to Expand Forum to Full Width