msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't update fields in form

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation
Author Message
Linda V



Joined: 04 Oct 2007
Posts: 1

PostPosted: Thu Aug 23, 2007 12:52 pm    Post subject: Can't update fields in form Reply with quote

The following code displays the form, but does not allow me to change the
value of any of the fields in the form. Can someone please tell me why,
because I sure can't figure it out. The form works fine in Access.

Notes:
The database is not marked read only.
I am the only user accessing the database (it is not locked by someone else).

Public Sub UDSloc()

Dim strDatabasePath As String
strDatabasePath = "C:\database\test.MDB"

Dim appAccess As access.Application
Set appAccess = CreateObject("Access.Application")

appAccess.OpenCurrentDatabase strDatabasePath
appAccess.Visible = True
appAccess.DoCmd.OpenForm "Test"

Set appAccess = Nothing

End Sub

Thanks for your help!

Archived from group: microsoft>public>vb>ole>automation
Back to top
View user's profile Send private message
Anand.V.V.N



Joined: 04 Oct 2007
Posts: 3

PostPosted: Tue Nov 06, 2007 12:30 pm    Post subject: RE: Can't update fields in form Reply with quote

Hi Linda,
I am not sure if this would be right the answer but may be you should open
the table also to update the fields? The code looks fine though, but do chec
kif the table needs to be opened.
Hope its helpful
Anand.V.V.N
--
"Who will guard the guards?"


"Linda V" wrote:

> The following code displays the form, but does not allow me to change the
> value of any of the fields in the form. Can someone please tell me why,
> because I sure can't figure it out. The form works fine in Access.
>
> Notes:
> The database is not marked read only.
> I am the only user accessing the database (it is not locked by someone else).
>
> Public Sub UDSloc()
>
> Dim strDatabasePath As String
> strDatabasePath = "C:\database\test.MDB"
>
> Dim appAccess As access.Application
> Set appAccess = CreateObject("Access.Application")
>
> appAccess.OpenCurrentDatabase strDatabasePath
> appAccess.Visible = True
> appAccess.DoCmd.OpenForm "Test"
>
> Set appAccess = Nothing
>
> End Sub
>
> Thanks for your help!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group