By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Is it possible to save unbound Continuous subform record Using Stored procedure and V

P: 11
Hi Eveybody,

I've a main form with a continuous subform based on 'DonorTranSmasterF' & 'DonorTranSdetailsF' ,
both tables are linked via 'DonorTransiD' field. I know & learn , How to save record Using SP & VBA
if the context of 'Unbound Continuous Subform' is it possible to save record via SP & VBA ?
Subform has two fields <'CboItemCode' and 'Txtamount'>.
(application build on A2003 ADP + Sql 2000 Srv.)
Attached Images
File Type: jpg Mainform_with_SubForm.jpg (8.5 KB, 405 views)
Mar 4 '10 #1
Share this Question
Share on Google+
1 Reply


Delerna
Expert 100+
P: 1,134
If I understand correctly
Yes, you will need to do it with VBA and you will need to add the DAO type library. To do that goto the code page of your form and go

"ToolsMenu/references"

You want to tick the "Microsoft DAO 3.6 Object Library"

Here is some sample code to help you along
Expand|Select|Wrap|Line Numbers
  1.    Dim db As Database, rst As DAO.Recordset, SQL As String
  2.    Set db = CurrentDb
  3.  
  4.    SQL = "SELECT * FROM TheTable" 
  5.    Set rst = db.OpenRecordset(SQL)
  6.    While not rst.eof
  7.       for I =1 to rst.fields.count-1
  8.           msgbox rst.fields(i)
  9.       next
  10.       rst.MoveNext
  11.    wend
  12.  
  13.    SQL = "exec TheStoredProc " & Param1 & "," & Param2 .... etc
  14.    db.execute(strsql)
  15.  
  16.    Set rst = Nothing
  17.    Set db = Nothing
  18.  
Judging from your other post I think you are capable enough to resolve your question from that.

Don't hesitate to ask for help if you need it though.
Just provide details.
Mar 4 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.