Thanks to everyone who responed.
Particular thanks go to Tsuji for the answer that worked.
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard, but play fair"
Hi, I've got a javascript issue that i can't seem to overcome. I have a page that works fine in Firefox but i can't get it working in IE6. Annoying thing is no error is actually thrown, the form just does not submit.
If anyone can spot the problem, I'll love you long time.
<!DOCTYPE HTML...
Oops,
As it is an object you are assigning you should use the SET keyword
SET Forms![ISubForm].Form.RecordSet = Objrst
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard, but play fair"
In the line of code you used, because you encased Objrst in quotes, Access thinks you are providing either:
1. The name of a table or saved query
2. An SQL Statement.
To achieve what you want to do, remove the quotes so that Access knows you are using an object variable, plus you need to assign...
I'm assuming you set breakpoints on every line of code in the body of the function. So the code "passes over" the Recordsetclone portion of code?
Try modifying the code slightly
Set rstClone = frmMail.RecordsetClone
rstClone.MoveFirst
If Not rstClone.EOF Then...
If the Form is not restoring to it's previous size then i would suggest that the code doesn't reach the docmd.restore line in your code.
Have you traced through the code to see what it does line by line? Does it ever reach the restore line?
Alec Doughty
Doughty Consulting P/L
"Life's a...
When run as you originally posted the code, did you get any errors? Or did the code just not do what you expect?
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard, but play fair"
Your problem is that Access2k uses ADODB Recordsets to drive it's forms.
You can't assign an ADODB Recordsetclone to a DAO recordset object.
modify your variable declaration to
Dim rstClone As ADODB.Recordset
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard...
...= dbUseODBCCursor
Set conn = wrksp1.OpenConnection("SIChangeReq_mmisd012", dbDriverNoPrompt, False, cnnStr)
sql = "SELECT * FROM TebsT_SI_ChangeRequests"
Set qry = conn.CreateQueryDef("RunStoredProc", sql)
Set rs = qry.OpenRecordset(dbOpenSnapshot)
If Not (rs.BOF Or rs.EOF) Then...
I absolutely love starting off Monday morning with a win, no matter how small.
I've solved the problem i described in this thread.
It has to do with the Cursor the workspace uses.
Before the connection is opened, you have to set the workspace.DefaultCursorDriver = dbUseODBCCursor
IE
Dim...
Cheers dan,
I've tried using dbOpenDynamic and dbOpanDynaset, with the same unfortunate results.
I would use ADO but i'm developing in access 97 and i need to dynamically create QueryDef's to use as the RecordSource of forms and reports. Correct me if i'm wrong but Access97 forms and reports...
...Recordset sourced from Stored Procedure.
Here is the stored procedure i am testing against.
CREATE PROCEDURE [ap_SI_TypeOfChReq_Select] AS
SELECT * FROM TebsR_SI_TypeofStaffChange ORDER BY StaffChangeID
return
As you can see, it's a pretty simple Stored Procedure and it definitely works as...
...the relevant permissions on the SQL Server i should be able to create a Stored Procedure?
Create Procedure "TebsSP_SI_TypeofStaffChange_Insert"
/* This Stored Procedure is designed to insert the Parameter @TypeOfStaffChange
into the table TebsR_SI_TypeofStaffChange */
@TypeOfStaffChange...
I was wondering whether it is possible to create a stored procedure using the command object from the ADO library?
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard, but play fair"
Maybe this will do the trick.
private sub Form_BeforeUpdate(cancel as integer)
Dim strMsg As String
strMsg = "Data has changed." & vbcrlf & _
"Do you wish to save changes the Record?" & _
vbcrlf & _
"Click Yes to Save or No to Discard changes."
if not me.newrecord and me.dirty...
Look into the Outlook Object library which you can create a reference to. It'll take some reading but it will be worth the investment in time.
Microsoft's MSDN website has all the documentation you'll need. That's where i learned about Outlook model programming.
Alec Doughty
Doughty Consulting...
If you can't get it working post your code and i'll look at it for you.
Alec Doughty
Doughty Consulting P/L
"Life's a competition. Play hard, but play fair"
To point you in the right direction.
This can all be done with the DAO library.
You will need the following objects:
DAO.Database
DAO.TableDefs
DAO.TableDef
The Access Help documentation will tell you everything you need to use these objects.
point the database object to point to the remote...
use the BeforeUpdate event of the form rather than a specific control.
private sub Form_BeforeUpdate(cancel as integer)
Dim strMsg As String
strMsg = "Data has changed." & vbcrlf & _
"Do you wish to save changes the Record?" & _
vbcrlf & _
"Click Yes to Save or No to Discard...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.