If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Unbound Form Recordset in 2007 Edition

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Sep 2007
Location: Global Village
Posts: 185
Unbound Form Recordset in 2007 Edition

Hi Folks,
in fact I have two questions in this thread:
1- I'm making an unbound form which I get its data from a back-end db by ADO in a recordset named objRST each time I select a data from a combo box in my form, the recordset statement is as follow:
Code:
objRST.Open strSQL, objConn, adOpenStatic, adLockOptimistic
the problem is I can not do edit on form's data

2-I have an attachment field in my form, when I do the steps in part 1 (above) it doesn't show the file in the related control
Thanx in advance
__________________
<<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
Graham Bell
Reply With Quote
  #2 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,212
have you understood what the parameters are in your .open method
"openstatic" means precisely that
Id recommend you change to adopendynamic or adopenkeyset
if you are using unbound recordsets then you have to do the work in populating controls AND making certain changes are posted back tot he DB. bound controls do a heck of a lot for you, but there are not the solution for all/many situations, unbound controls are a great way of dealing with forms, but you loos most of the whizzy bits from the Access IDE.

yer pays yer money, yer takes yer choice
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Sep 2007
Location: Global Village
Posts: 185
ooooops I forgot that, but I change it to adopendynamic and receive following error: error 7965 the object you entered is not a valid recordset property
and the adopenkeyset doesn't change anything I mean the controls are still un editable!
what about the secon part of my thread? do you have any idea?
__________________
<<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
Graham Bell
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Sep 2007
Location: Global Village
Posts: 185
Any Other Idea?
__________________
<<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
Graham Bell
Reply With Quote
  #5 (permalink)  
Old
L33t Helpa Munky
 
Join Date: Nov 2007
Location: Adelaide, South Australia
Posts: 4,049
Since you have provided no information other than one single line of code, it's of course, impossible to diagnose your first problem.

The attachment should be a string representing the path to the attached file. The user should take an action to view the content of the attachment in its native editor... imo.

It's also better to put one problem per thread.
__________________
Owner and Manager of
CypherBYTE, Microsoft Access Development Specialists.
Microsoft Access MCP.
And all around nice guy!


"Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
"...teach a man to code and he'll be frustrated for life! " -- georgev
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Sep 2007
Location: Global Village
Posts: 185
O.k Hands Up I'm interesting in my second question Star.
What I think is when you open the recordset based on back-end db and set the Unbound form's recordset to that it shall show the file attached to the attachement field in the form like other controls, but it doesn't with no error
I even tried to set the attachement control value to the relevant value in recordset
Code:
Me!Attachment147 = objRST![Document file]
and get this error: error438 object doesn't support this property or method
__________________
<<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
Graham Bell
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On