Search results

  1. J

    MsgBox after Form_Current

    AFTER FURTHER RESEARCH HERE'S WHAT I FOUND 1. You cannot use any code on the Form_Current event because it is always executed before the form is displayed. 2. I created a public function on the form to be opened that tested some fields on the form and if the test was positive, display a...
  2. J

    Display average value from query in label

    Try this on the Click event Me![LabelFieldName].Caption = "THE AVERAGE IS " & Format(X/Y, "#,##0.00")
  3. J

    MsgBox after Form_Current

    This seems like a dumb question but for the life of me, I cannot figure out how to do it. I want to display a message box when a form is opened and displayed based on some test done in the Form_Current Event. However all the code in the Form_Current event is fired off before the form is...
  4. J

    Copy Table to Word Document

    Here's an interesting issue. I want to copy a table from Access to a Word Document Table. I have tried copying a table in a form, but Access adds Subform Name, and Column Heads in gray format and I really don't want all the extra stuff. So I decided to build a string tab delimited for the...
  5. J

    Could not use 'Admin'; File already in use.

    I'm working on an MSAcess 2003 database and I have saved the System.mdw file to a folder on the Server and linked all users to it. When multiple users attempt to log in, they get the message Could not use 'Admin'; filer already in use. I have used shared system.mdw files for years with no...
  6. J

    Use Stored Proc As Recordset For Listbox

    Almost For Roy Vidar, Thanks for all your help with getting a listbox's recordset from a stored procedure. I finally got back to this issue and was able to get it working. Thanks again. I also tried to set a form's recordset to a stored proc. This worked great and is blazingly fast...
  7. J

    Recordsetclone = Dao Or Ado?

    When I open a recordsetclone based on Access Table it returns a DAO recordset. However if I open a recordsetclone based on a ADODB recordset as in the case of one generated from a Stored Proc it returns an ADODB recordset. 1) Tell me true! Is this true? 2) If yes to the above, is there...
  8. J

    Sorry if this is the wrong spot...

    Are you trying to do this in table view, datasheet view, or on a form? :confused:
  9. J

    Use Stored Proc As Recordset For Listbox

    For RoyVidar, I tried the code block you sent and I was hoping and praying that it would work. I even offered by first born child to the stored proc gods. It looked so promising but then when it tries to set the List Box's recordset property I get the error message: Object doesn't support...
  10. J

    Use Stored Proc As Recordset For Listbox

    For Pat Hartman, Per our emails yesterday, my experience is that Stored Procs are significantly faster than queries. After your email, I didn't sleep all night. So when I got back to my computer this morning, I thought I would do a benchmark to compare speeds. I created 2 procs, the first...
  11. J

    Use Stored Proc As Recordset For Listbox

    I have tried every permutation of code to get this to work but it doesn't seem to like it. Here is the latest. Set cmd = New ADODB.Command cmd.CommandText = "{ Stored Proce Name(" & Me![Parameter1] & ", " & Me![Parameter2] & ") }" cmd.CommandType = adCmdStoredProc...
  12. J

    Use Stored Proc As Recordset For Listbox

    Pat, I know I couldn't get the recordset property to work, but the following article seems to state that it is doable. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acproRecordset_HV05251093.asp Any thoughts?
  13. J

    Use Stored Proc As Recordset For Listbox

    Pat, In reading some of your recent responses, I have noted that you feel that queries on the front end Access database are not significantly slower than Stored Procs running on the SQL Server Backend. Over the years, I have developed many Access Frontend with SQL Server back ends and the...
  14. J

    Use Stored Proc As Recordset For Listbox

    I'm working on and Access 2003 front end with a SQL Server Back End. I would like to take advantage of the speed of Stored Procs to populate a list box on a form. Here's the code I'm trying to use. Set cmd = MakeStoredProc("StoredProcName") Set prm1 = cmd.CreateParameter("ParamName"...
  15. J

    continous form

    You can put tests for required fields in the Form_BeforeUpdate Event. For example here is some code examples Form_BeforeUpdate(....) If IsNull(Me![TestField]) Then strMsg = "Test field is required. Enter it before continuing. " msgbox strmsg cancel = true exit sub...
  16. J

    continous form

    Is your [Add] Button on the Parent Form or on the Subform? If it is on the Parent Form, is the Parent Form bound. If it is not bound, the Save command will give you the error you received. If the above is true, you must first set focus in the subform before you save. Add...
  17. J

    Corrupted characters in MakeTable Result

    Question Was your database originally an Access 97 or less and now running in Access 2000 or more? I have had this problem in an old database that was originally written in Access 2.0 and is now running in Access 2003. I believe in Access 2002, MS started using unicode instead of ASCII and I...
  18. J

    Using Shift And Cancel

    Why do you think the BeforeUpdate event is too late to validate data. I have been doing it since Access 2.0. It works great. I prefer to validate data on the form because I have much more control to test against other fields and virtually whatever I want. :D
  19. J

    Using Shift And Cancel

    I like to hang functions on form and control events on the property Dialog. They work great except for one limitation. I would like to hang a function on the Before_Update Event, for example = TestDate(), and be able to set the Cancel Parameter in the function and have the Cancel executed...
  20. J

    Open Another Database Without Closing Current Db

    I use the following lines of code to Close the current DB and open another DB. DoCmd.Close acForm, Screen.ActiveForm.Name SendKeys "%FO" & pasPathName & "~", False I thought it would be fun to be able to open another database in another window without closing the current db...
Back
Top Bottom