Hi Chris,
Sorry there is a typo, it should be "Records" instead of "record"
Set CBarCtl = CBarMenu.Controls("Records")
Note: I assume the Refresh command is available when executing the command
Execute.
You may also try Guy's method :- )
Sincerely,
Alick Ye, MCSD
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Chris" <
[email protected]>
| Sender: "Chris" <
[email protected]>
| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Hi Alick,
| I already have this one included, but it still
| fails. I think your code is right, but it just won't run.
| I'm at a bit of a loss. I tried creating an mdb instead of
| the adp I am using, but it wasn't available there either.
| I tried defining the variables as type object and whilst
| the declarations were then on the code failed on :
|
| Set CBarCtl = CBarMenu.Controls("Record")
|
| I am using windows 2000, and Access 2000 do you know if it
| works for this environment.
|
| Thanks for your help
| Chris
|
| >-----Original Message-----
| >Hi Chris,
| >
| >We may need to add "Microsoft Office 9.0 Object library"
| (tools->References
| >in VBIDE Window) if you use Access 2000.
| >
| >Hope it helps.
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Microsoft Online Partner Support
| >
| >Get Secure! -
www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Chris" <
[email protected]>
| >| Sender: "Chris" <
[email protected]>
| >| References: <
[email protected]>
| ><
[email protected]>
| ><
[email protected]>
| ><
[email protected]>
| ><
[email protected]>
| ><
[email protected]>
| ><
[email protected]>
| ><#
[email protected]>
| >| Subject: Re: Multiuser environment
| >| Date: Thu, 14 Aug 2003 09:24:26 -0700
| >| Lines: 232
| >| Message-ID: <
[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcNigIddylr0aEF5SySDrSYodBjkWQ==
| >| Newsgroups: microsoft.public.access.adp.sqlserver
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.access.adp.sqlserver:13723
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
| >|
| >| Hi Alick,
| >| I have had problems adding the code, do I need
| to
| >| set a reference first before I can use the Commandbar
| and
| >| CommandBarPopup?
| >|
| >| My system does not recognise these as types of objects.
| >| They are not available from intellisense when defining
| the
| >| variable and fails with a mesage about userdefined type
| >| not recognised.
| >|
| >| Thanks
| >| Chris
| >|
| >| >-----Original Message-----
| >| >Hi Chris,
| >| >
| >| >If you mean Record->Refresh menu is what you want, we
| can
| >| trigger the menu
| >| >command by code:
| >| >
| >| > Dim CBarMenu As CommandBar
| >| > Dim CBarCtl As CommandBarPopup
| >| >
| >| > Set CBarMenu = Application.CommandBars("Menu Bar")
| >| >
| >| > Set CBarCtl = CBarMenu.Controls("Record")
| >| >
| >| > CBarCtl.Controls("Refresh").Execute
| >| >
| >| > Hope it helps.
| >| >
| >| >
| >| >
| >| >
| >| >Sincerely,
| >| >
| >| >Alick Ye, MCSD
| >| >Microsoft Online Partner Support
| >| >
| >| >Get Secure! -
www.microsoft.com/security
| >| >This posting is provided "as is" with no warranties
| and
| >| confers no rights.
| >| >
| >| >
| >| >--------------------
| >| >| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
| >| >|
| >| >| Josh,
| >| >|
| >| >| Actually, your other post just gave me an idea, I
| >| wonder
| >| >| if I can clone the recordset, then write a separate
| ADO
| >| >| query to get the data on the current record, update
| the
| >| >| clone and reconnect it.
| >| >|
| >| >| Will try that tomorrow too.
| >| >|
| >| >| If anyone else has any ideas please post!
| >| >|
| >| >| Cheers
| >| >| Chris
| >| >|
| >| >|
| >| >| >-----Original Message-----
| >| >| >I completely missunderstood the question. sorry
| about
| >| >| that. the only way
| >| >| >that i can think of doing it is 1. the way Van
| >| explained
| >| >| or two (haven't
| >| >| >tried yet) create a me.requery or me.refresh on the
| >| >| fom_current.
| >| >| >
| >| >| >sorry about that post,duh
| >| >| >
| >| >| >| >| >| >> Hi Josh,
| >| >| >> Thanks for answering.
| >| >| >>
| >| >| >> I got a little lost with what you mean though,
| >| please
| >| >| can
| >| >| >> you explain further. Are you talking about ADO?
| >| >| >>
| >| >| >> I am using an Access 2000 bound form to a SQL2000
| >| >| backend.
| >| >| >> I have not opened any ADO connections in code.
| The
| >| >| refresh
| >| >| >> I am speaking about is not the refresh method of
| the
| >| ADO
| >| >| >> command object, but rather the refresh facility
| >| within
| >| >| >> access itself.
| >| >| >>
| >| >| >> Regards
| >| >| >> Chris
| >| >| >>
| >| >| >>
| >| >| >> >-----Original Message-----
| >| >| >> >Are you making sure that you are closing the
| >| >| >> recordset/command and
| >| >| >> >connection after an update?
| >| >| >> >
| >| >| >> >| >| >| >> >> Hi,
| >| >| >> >> Thanks for replying.
| >| >| >> >>
| >| >| >> >> I have tried this, but it did not work.
| >| >| >> >>
| >| >| >> >> I followed the instructions here:
| >| >| >> >>
| >| >| >> >>
http://msdn.microsoft.com/library/default.asp?
| >| >| >> >> url=/library/en-
| >| >| >> >>
| >| >| >>
| >| >|
| >|
| us/off2000/html/achowChangeHowOftenDataIsUpdatedAutomatical
| >| >| >> >> lyS.asp
| >| >| >> >>
| >| >| >> >> but note at the bottom it says about how this
| >| only
| >| >| works
| >| >| >> >> if your database is shared on a network. I
| wonder
| >| if
| >| >| >> this
| >| >| >> >> relates to .adp files as well as .mdb, as .adp
| >| files
| >| >| >> don't
| >| >| >> >> get shared in a multiuser environment, but
| rather
| >| >| each
| >| >| >> >> user hets his/her own copy of the frontend.
| >| >| >> >>
| >| >| >> >>
| >| >| >> >> Regards
| >| >| >> >> Chris
| >| >| >> >>
| >| >| >> >>
| >| >| >> >> >-----Original Message-----
| >| >| >> >> >Try using the Menu
| Tools /Options ... /Advanced
| >| tab
| >| >| and
| >| >| >> >> set the Refresh
| >| >| >> >> >interval to a shorter duration.
| >| >| >> >> >
| >| >| >> >> >--
| >| >| >> >> >HTH
| >| >| >> >> >Van T. Dinh
| >| >| >> >> >MVP (Access)
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >| >| >| >> >> >> Hi,
| >| >| >> >> >> I am using SQL2000 and Access2000 .adp
| >| file. My
| >| >| >> >> >> application will need to be distributed to
| >| several
| >| >| >> >> people
| >| >| >> >> >> in our organisation and they will need to
| >| update
| >| >| the
| >| >| >> >> data
| >| >| >> >> >> concurrently.
| >| >| >> >> >>
| >| >| >> >> >> I set up a simple test .adp file. And put a
| >| copy
| >| >| >> into 2
| >| >| >> >> >> directories named user1ADP and User2ADP.
| >| >| >> >> >> I logged onto the network as user1 on 1
| >| >| workstation
| >| >| >> and
| >| >| >> >> >> opened the user1ADP file. I logged onto a
| >| separate
| >| >| >> >> >> workstation as user2 and opened user2ADP
| file.
| >| >| >> >> >>
| >| >| >> >> >> At this point both users could see the test
| >| >| >> database. If
| >| >| >> >> >> user 1 made a change to a record the change
| was
| >| >| >> recorded
| >| >| >> >> >> in the SQL backend (looking in Enterprise
| >| >| manager).
| >| >| >> If
| >| >| >> >> >> user 2 made a change to the same data an
| error
| >| >| >> popped up
| >| >| >> >> >> saying that 2 users were trying to access
| the
| >| same
| >| >| >> data
| >| >| >> >> >> etc..
| >| >| >> >> >>
| >| >| >> >> >> OK, so far so good. However If user1 makes
| a
| >| >| change
| >| >| >> to a
| >| >| >> >> >> record, user2 continuse to see the data as
| it
| >| was
| >| >| >> when
| >| >| >> >> >> they opened their copy of the database
| because
| >| it
| >| >| is
| >| >| >> >> >> looking at the local cache rather than the
| SQL
| >| >| box.
| >| >| >> >> >> Hitting refresh solves this, but I can't
| have
| >| the
| >| >| >> users
| >| >| >> >> >> needing to do this manually, Is there a way
| to
| >| >| call
| >| >| >> this
| >| >| >> >> >> in the OnCurrent event, so that only the
| most
| >| >| recent
| >| >| >> >> data
| >| >| >> >> >> is displayed by other users?
| >| >| >> >> >>
| >| >| >> >> >>
| >| >| >> >> >> Thanks
| >| >| >> >> >> Chris
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >.
| >| >| >> >> >
| >| >| >> >
| >| >| >> >
| >| >| >> >.
| >| >| >> >
| >| >| >
| >| >| >
| >| >| >.
| >| >| >
| >| >|
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|