User Profile

Collapse

Profile Sidebar

Collapse
anniebai
anniebai
Last Activity: Aug 7 '09, 09:00 PM
Joined: Aug 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • The object you entered is not a valid recordset property

    I have a subform, whose data source is a parametered stored procedure.
    The following code is added in Form_open, but I always got the error msg 'the object you entered is not a valid recordset property'. I've read the disconnection problem that posted on MS website, however it seems not for my case. I tried cursor too, not work.
    Any suggestions are very much appreciated~~

    Code:
    Private Sub WhoFinishedSubFormRequery()
    ...
    See more | Go to post

  • I can see that the example takes more than one string parameters. In the case of more than one integer pars, is ParamArray then the only option? do you have some examples of ParamArray?

    Thanks a lot for your kind reply and helps....
    See more | Go to post

    Leave a comment:


  • Code:
    Dim rst As ADODB.Recordset
    Set rst = fFunctionReturningADODBRecordset()
    
    'Process the Recordset
      '...Yada,Yada,Yada
    
    'Close the Recordset in Memory & claim resources
    rst.Close
    Set rst = Nothing
    Since fFunctionReturn ingADODBRecords et() is also a recordset, Do I need to do this at the end of the calling procedure?
    Set fFunctionReturn ingADODBRecords et() = not...
    See more | Go to post

    Leave a comment:


  • I tried to create a function like
    Public Function ExecuteSP(spNam e As String) As ADODB.Recordset

    But problems are:
    1. How to set the return value, which is ADODB.RecordSet , to nothing?
    2. Where and how to pass the stored procedures' parameters? the stored procedures have various number and type of parameters.

    Thanks very much for any inputs.
    See more | Go to post

    Leave a comment:


  • My code is like below. There're several Subs function similarly, the differences are the stored procedure names, procedure parameters, and the control name (which is to receive the RecordSet)

    Code:
    Private Sub LectureMaintSubFormRequery()
        Dim cmd As ADODB.Command, rst As ADODB.Recordset
        Set cmd = New ADODB.Command
        cmd.ActiveConnection = CurrentProject.Connection
        cmd.CommandText = "EXEC
    ...
    See more | Go to post

    Leave a comment:


  • Thanks ADezii. It seems a safe plan. I'll give it a try.
    See more | Go to post

    Leave a comment:


  • And these two lines are redundant everywhere. Is there a better way to work around them? Thanks again.

    Set cmd = New ADODB.Command
    cmd.ActiveConne ction = CurrentProject. Connection
    See more | Go to post

    Leave a comment:


  • anniebai
    started a topic Declare database connection variables as global

    Declare database connection variables as global

    In my Access database project, SQL server as backend, there're several functions have this repeated piece of code. I wonder if it's OK to declare the two variables (one for ADODB command, another is for RecordSet) as global? will that cause any potential problems? Thanks very much.

    Dim cmd As ADODB.Command, rst As ADODB.Recordset
    Set cmd = New ADODB.Command
    cmd.ActiveConne ction = CurrentProject. Connectio...
    See more | Go to post

  • anniebai
    started a topic listbox/combo box crashes access 2007

    listbox/combo box crashes access 2007

    My application has a master form as Student, and several child subforms (projects, courses, attendances) attached to a certain student. The master and child are connected by "StudentID" .

    Taking Courses subform as an example, the form has a listbox field as CourseID, which displays detailed information of a course. The administrator could register a student for a course by selecting a course from the dropdown list.
    ...
    See more | Go to post

  • anniebai
    started a topic In datasheet view, how to display a hidden field

    In datasheet view, how to display a hidden field

    I am testing a form converted from access 2003 to 2007. This form has two keys (StudentID and ProjectID).
    if I choose form view, both fields displays. but if in datasheet view, only ProjectID show up. There's no code behind. and the visible value of StudentID is yes. What else shall I do to display the studentID field on datasheet view?

    And more, in form view, although "allow delete", "allow addition" are...
    See more | Go to post

  • anniebai
    replied to operation must use an updatable query
    Thank you NeoPa.
    I am sure the alternative SQL will be useful for people like me, I look forward to seeing them.
    See more | Go to post

    Leave a comment:


  • anniebai
    replied to operation must use an updatable query
    Maybe i missed something, but I've read the troubleshoot page, as far as I understand, none of the items listed answers my question.
    See more | Go to post

    Leave a comment:


  • anniebai
    replied to operation must use an updatable query
    hmm. I thought I had the same problem before. thanks for reminding me :-)
    I know I can work around to achieve the same goal, but I really want to figure out whether this is because Access doesn't support this query or the query itself has a problem. The error message Access gives is misleading....
    See more | Go to post

    Leave a comment:


  • anniebai
    started a topic operation must use an updatable query

    operation must use an updatable query

    Can someone help me with this query, which gives the error message "operation must use an updatable query"? Thanks a lot.
    Code:
    UPDATE publications set publications.pmcid = (select fname.pmcid from fname where fname.pmid=publications.pubmedid)
    this following query works fine:
    Code:
    UPDATE publications inner join fname on fname.pmid=publications.pubmedid
    set publications.pmcid = fname.pmcid
    See more | Go to post
    Last edited by NeoPa; Sep 6 '08, 07:13 PM. Reason: Please use the [CODE] tags provided

  • Thank you very much Linq....
    See more | Go to post

    Leave a comment:


  • and any good books for programming in access 2007?
    Thanks
    See more | Go to post

    Leave a comment:


  • anniebai
    started a topic What's new in Access 2007 programer wise?

    What's new in Access 2007 programer wise?

    Is VB.net and/or c# allowed? does Visual Studio support Access now?
    any good tips for programmers other than the interface and configuration tools?
    I am trying 2007, but honestly, haven't found anything exciting so far.
    Would really appreciate any suggestions and tips.
    See more | Go to post

  • anniebai
    replied to How to edit the VBA code in Visual Studio?
    Ya, I am hesitate to A2007 too.
    Do you guys know how to make VBScroll as a startup service so there's no need to manually turn it on?
    See more | Go to post

    Leave a comment:


  • anniebai
    replied to How to edit the VBA code in Visual Studio?
    Thank you so much, NeoPa. It works perfectly.
    I am using office 2003. Now i start wondering how come the standard is not standard on my machine :-(
    See more | Go to post

    Leave a comment:


  • anniebai
    started a topic How to edit the VBA code in Visual Studio?

    How to edit the VBA code in Visual Studio?

    Is there a way to view/edit VBA code through Visual Studio 2005? I've installed VSTO, It works for word/excel/powerpoint, but don't know how to get Access VBA code opened in VS.
    I used to use the middle button of mouse to scroll down pages of code, however, Access code editor doesn't support this, I have to drag the scroll bar to get down to the page. which sounds minor but drives me crazy.
    Your suggestions and inputs are highly ...
    See more | Go to post
No activity results to display
Show More
Working...