Results 1 to 7 of 7

Thread: [RESOLVED] can u clarify my "acceessing M.S Access with V.B" problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Resolved [RESOLVED] can u clarify my "acceessing M.S Access with V.B" problem

    Hi All!
    while i was browsing VB forum, i found a thread related to M.S access with V.B, that is what i am searching for.
    Actually, i ran the following code, but while my data base"sample.mdb" was opening, a popup message "security waring " is coming, if i clik ok, then only the data base is opening...
    (1) what shall i do, to avoid that popup menu..
    (2)another thing is, to open the table in the data base (here table is "table1)
    i have to double clik on it. can i also open the table with programatically..?
    (3)If possible kindly explain the below lines where i commented,for what purpose there are to be written...

    Private Sub Command1_Click()
    Dim objACCESS As Access.Application
    On Error Resume Next
    Set objACCESS = New Access.Application
    objACCESS.OpenCurrentDatabase App.Path & "\sample.mdb"
    DoCmd.OpenReport "table1", acViewPreview ' WHAT IS acViewPreview
    objACCESS.Visible = True
    DoCmd.Maximize 'PLEASE EXPLAIN THESE FOLLOWING LINES
    objACCESS.DoCmd.Maximize
    objACCESS.DoCmd.OpenReport "PID", View:=acViewPreview
    objACCESS.DoCmd.Maximize
    End Sub



    Thanks in advance:
    regards:
    raghunadhs

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    1) Open ur Ms access. Click on Tools->Macros->Security. In the Security Level Tab click Low option. This might save ur security warning.
    2. Open ur db Click on Tools->Options. In the View tab in the click options select Single Click to open. Now u can open table without dbl click.

  3. #3
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    acViewNormal,acViewPreview etc I believe are constants used to open a report. in acViewNormal the report is not displayed but sent to printer for printing while in acViewPreview the report is displayed to the user much like word preview. If you have MSDN type docmdobject and select access to get more info.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    Hi VbFnewComer,
    Thanks.... Now that warning message is not coming. i am happy. another problem is, my data base is being opened and my table is visible, but the table is not getting opened. to open it what code is to be written?
    (1) my table is a student detais such as student no, name, and percentage, can i add a record to my data base through v.b? similarly can i delete a record , if so, please tell me how to do...
    if u answer my questions by modifying the existed code,( what i mentioned in my question in earlier quote), it will be very helpful to me..
    Thanks in advance:
    regards:
    raghunadhs

    Quote Originally Posted by VBFnewcomer
    acViewNormal,acViewPreview etc I believe are constants used to open a report. in acViewNormal the report is not displayed but sent to printer for printing while in acViewPreview the report is displayed to the user much like word preview. If you have MSDN type docmdobject and select access to get more info.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    Hi vbnewcommer!
    I am not having MSDN, if possible could u pls suggest any tutorial regarding to connecting M.S access with V.B....
    Thanks in advance:
    regards:
    raghunadhs

  6. #6
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    my table is a student detais such as student no, name, and percentage, can i add a record to my data base through v.b? similarly can i delete a record
    sure you can
    could u pls suggest any tutorial regarding to connecting M.S access with V.B.
    http://www.vbforums.com/showthread.php?t=337051 in this page go to Classic VB - ADO section.
    One more thing do not just copy & paste the codes found in the forum, try to understand them. As a start spend lot of time in understanding the ADO tutorial. Good Luck.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u clarify my "acceessing M.S Access with V.B" problem

    Thanks VBnewcomer,
    i will follow your suggestion... and will look into that link...
    Thanks, i will give u feed back soon,
    regards:
    raghunadhs.
    Quote Originally Posted by VBFnewcomer
    sure you can
    http://www.vbforums.com/showthread.php?t=337051 in this page go to Classic VB - ADO section.
    One more thing do not just copy & paste the codes found in the forum, try to understand them. As a start spend lot of time in understanding the ADO tutorial. Good Luck.

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