User Profile

Collapse

Profile Sidebar

Collapse
beebelbrox
beebelbrox
Last Activity: Oct 4 '09, 11:28 PM
Joined: Aug 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • beebelbrox
    started a topic Calling a subroutine in a second database

    Calling a subroutine in a second database

    Greetings,

    I am stuck on this. Is it possible to have a subroutine in one database call a subroutine in a second database. my attempt below produces an error. The error i get is "compile error sub or function not defined"

    My guess is I'm not opening the second DB correctly

    Thanks,

    B


    Code:
        ':><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><::><:
    ...
    See more | Go to post

  • beebelbrox
    started a topic Where clause issues.

    Where clause issues.

    Okay like I must be blind and dumber than a box hammers but i cant figure out what wrong with this where clause

    Code:
    & "WHERE tblMasterDbList.[DBName]<> '" & filSub & "';"
    the error message say the ";" is missing at the end of the statment

    I've checked out the net and some other soruces and it looks right but............ ....

    here is the whole query,...
    See more | Go to post
    Last edited by Stewart Ross; Jun 25 '08, 08:23 AM. Reason: Added code tags to delineate code

  • beebelbrox
    started a topic Export access data to excell

    Export access data to excell

    Greetings all.

    Once more I must dip into the font of your collective wisdom and request help:

    I have been given the task of taking an exsisting Access Query and exporting it to excel. There are hitches. The query has two groups of records "A" and "B".

    The excel spread sheet needs to display Group "A" followed by the subtotals for select fields. Next a little white space...
    See more | Go to post

  • beebelbrox
    replied to Code design Theory
    ADezii

    I think I see now, the confusion is on my end, as well as the bad example. Simply Puting the variable in a Public Sub doesnt give it scope for the Whole Project.


    Public Sub Mod1()
    Dim Variable1

    is very diferent then from

    Public Variable1
    Public Variable2
    Public VariableN
    Public Sub Mod1()
    See more | Go to post

    Leave a comment:


  • beebelbrox
    replied to Code design Theory
    ADezii:

    Follow up question then (I hope this make sense):


    It would be considered good practice then to define as many of your public variable in the first module and then call them as needed rather then to define them in a separate module, for example:
    Code:
    Public Sub Module1()
    
    DimVariable1 as Integer (count)
    
    Other Necessary code
    Call Module2()
    
    End sub
    ...
    See more | Go to post

    Leave a comment:


  • beebelbrox
    replied to Code design Theory
    Thanks NeoPa I appreciate you taking the time to answer such a simple question.

    B
    See more | Go to post

    Leave a comment:


  • beebelbrox
    started a topic Code design Theory

    Code design Theory

    Okay this may be a bit trivial, it is a concept Im having difficulty understanding. When creating VB code I like to break up job steps/functions into seperate modules for example;

    01Globals
    02Cleardatatabl es
    03 CreateDateStrin g
    04 etc..etc

    The module 01Globals list all of the variables used by every module and the code there calls each module in sequence;
    Code:
    Option Compare Database
    ...
    See more | Go to post

  • beebelbrox
    replied to Converting QBE Query to SQL string
    INTO statement would be used to create the third table "Join_Top_Botto m". This code takes two tables and joins them together in a third table....
    See more | Go to post

    Leave a comment:


  • beebelbrox
    started a topic Converting QBE Query to SQL string

    Converting QBE Query to SQL string

    Good Afternoon

    I am trying to convert an Access QBE Query to an SQL string and I am not sure where the error is. This query Joins two tables (Top, Bottom) and makes a New Table "Join_Top_Botto m". The QBE works in acces, here is the Access version of the SQL;

    SELECT TOP_050307.obs, TOP_050307.MHSc laim, TOP_050307.line , TOP_050307.Comp No, TOP_050307.Vend or, TOP_050307.PayV endor, TOP_050307.topa y, Bottom_050307.O RGClaim,...
    See more | Go to post

  • Please asccept my whole hearted and sincer thanks for your help Adezii.

    b...
    See more | Go to post

    Leave a comment:


  • ADezii

    I've had a chance to look at the code more and have a couple of questions. The solution you developed doesnt open a connection to the db/table which is in a separate db stored in a remote network location.

    Why is a connection not needed? The table PPmaster is a linked table does that have any effect? If it wasnt linked would I then need to set up a connection? Is this because the new code is acting as a filter...
    See more | Go to post

    Leave a comment:


  • Adezii

    As expected your code work great, very smooth and tight. I hadnt considered adding an escape if none of the three conditions were meet. Nice catch there.

    Thanks You very much...
    See more | Go to post

    Leave a comment:


  • This may be OBE but;

    Adezii
    The lines 65 to 72 do produce valid results as viewed in the immediate window. Each SQL returns the appropriate records, I've verified this. I will try what you have suggested here as well as the new code you've provided.

    BTW thank you for the time you've spent on this to date....
    See more | Go to post

    Leave a comment:


  • ADezii

    I am running MS2003. The form name changed after I back up the data but everything is the same just a name change. I am trying to keep things the same to minimize compounding errors....
    See more | Go to post

    Leave a comment:


  • ADezii

    After seeing your reply I Have done exactly as you directed, the NAV code is gone and I tried the line of code:

    "Set Forms!frmMaster DisplayB.Record set = gRS"

    it produced the same error
    ERROR MSG: 7965 the object you entered is not a vaild recordset property...
    See more | Go to post

    Leave a comment:


  • ADezii

    Alas, this did not work. I tried various syntax of the cmd and I received an error. Placing the suggested line after the case statements produces:

    'Forms.frmMaste rDisplayB.Recor dset = gRS

    ERROR MSG: 438 Object Doesnt support this property or Method

    'Set Forms!frmMaster DisplayB.Record set = gRS
    'Set Forms.frmMaster DisplayB.Record set = gRS...
    See more | Go to post

    Leave a comment:


  • ADezii:

    I did not do as you suggest simply, and worst yet, most embarrassingly because I did not know I could. I will try your solution today (090407) and let you know how I fare. Allowing windows to handle the navigation is preferred since the users may be confused by or resistant to using the NAV buttons I created....
    See more | Go to post

    Leave a comment:


  • Linq, ADezii:

    This came about as most things do. I was given an assignment because there were no other resources available. I have been working with access for several years but strictly thru the GUI, with out ever touching code. My professional background is comprised of Software QA, Project Management and anything for buck. I do not claim to be a developer and this is my first attempted at coding, other than “Hello World”...
    See more | Go to post

    Leave a comment:


  • Form problem with navigation and display of records

    Hi, I am new VB programming in Access and I am requesting help with the following code.

    WIndows OS MSaccess 2003

    This code is attached to an unbound form that will display a specific recordset based in information passed to the form from another form. The problem I am having is that for each of the case statements the proper records (values and Number of records) are being returned but the movement commands do not work...
    See more | Go to post
    Last edited by MMcCarthy; Sep 2 '07, 02:01 AM. Reason: added code tags for readability

  • beebelbrox
    started a topic not able to navigate recordset

    not able to navigate recordset

    Hi, I am new VB programming in Access and I am requesting help with the following code.

    This code is attached to a form that will display a specific recordset based in information passed to the form from another form. The problem I am having is that for each of the case statements the proper records (values and Number of records) are being returned but the movement commands do not work, only the first record in the set is displayed....
    See more | Go to post
    Last edited by debasisdas; Nov 3 '07, 11:34 AM. Reason: Formatted using code tags.
No activity results to display
Show More
Working...