Results 1 to 5 of 5

Thread: A few questions (easy)

  1. #1

    Thread Starter
    Addicted Member Mage33's Avatar
    Join Date
    Aug 2000
    Location
    Petaluma, California
    Posts
    138

    Arrow

    #1. How do you make a text box auto scroll once the text has gone beneath it's watermark?
    #2. How do I make text go to the next line like a BR in HTML? IE: text1.text = text1.text + <linebreak> + text2.text...
    #3. How do I access a Access Database using VB?
    Thanks for any help you guys can offer, sorry for the foolish questions but I'm new to VBing *grumble, grumble, where's C++ when you're familiar with it*
    Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
    -ShardsOfSilence.net- ^ My name in ASCII ^
    You forget something new every day
    | WinME | VB6 Pro | MSC++ | Lambda MOO |

  2. #2
    Guest
    Q1:

    Code:
    Private Sub Command1_Click()
    Text1.SelStart = Len(Text1)
    End Sub
    Q2:

    Code:
    Text1.text = "<html>" & Chr$(13) & Chr$(10) & "</html>"

  3. #3
    Guest
    Not sure if this is what you need for the line break...

    Line breaks cannot be entered in the Properties window at design time. Within a procedure, you create a line break by inserting a carriage return followed by a linefeed (ANSI characters 13 and 10). You can also use the constant vbCrLf to insert a carriage return/linefeed combination. For example, the following event procedure puts two lines of text into a multiple-line text box (Text1) when the form is loaded:

    Sub Form_Load ()
    Text1.Text = "Here are two lines" _
    & vbCrLf & "in a text box"
    End Sub


  4. #4

    Thread Starter
    Addicted Member Mage33's Avatar
    Join Date
    Aug 2000
    Location
    Petaluma, California
    Posts
    138

    Thanks

    Yeah, what I meant was VB's equivelant to the line break of HTML... sorry if I didn't make that clear. vbCrLf was what I was looking for though. Thank you both.
    Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
    -ShardsOfSilence.net- ^ My name in ASCII ^
    You forget something new every day
    | WinME | VB6 Pro | MSC++ | Lambda MOO |

  5. #5
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Opening Access is like opening any other Application using its exposed Object Model

    Try this:

    Dim accApp As Access.Application
    Set accApp = CreateObject("Access.Application")

    Remember to create a Reference in your Project to MSAccess, to allow early binding.

    Then you can use the Access Object Model in your project by creating instances of TableDefs, Recordsets etc....

    For More Information See "CreateObject Function."


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width