Re: Problem using VBA to create sequentially numbered documents in Word



if you have multiple users and a single common number sequence, by definition you are going to need the source of those numbers to be in a location which is available to all the users. And also, you are going to need to be able to do it in a way that can cope with two simultaneous requests from different people.

If you are new to programming, I suspect that this is going to be a bit beyond you - you have picked a multi-access multi-user problem for what appears to be one of your first programming projects.

You need a database for this. Admittedly a very small one, but a database nevertheless. I'm not a database programmer, so at this point I'm going to drop out of this conversation.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"SLind via OfficeKB.com" <u15764@uwe> wrote in message news:577b594572876@xxxxxx
Thanks for your reply.
The problem I am running into is:
I need to create a new sequential number everytime one of 4-5 other documents
is opened. In other words, if I opened document B, it might have an invoice
number of, say 10027. If someone else opens document D a second later, it
would need to have an invoice number of 10028. The use of a
"privateprofilestring" does not appear to work when there are multiple users
on multiple computers in a network.
Any help is greatly appreciated.
thanks,
Steve
dfwtxsteve (at) aol.com


Jezebel wrote:
You can't update another document without opening it. A macro in document 1
could update document2, but it would have to open it to do so. But using a
second document just to store your number is unnecessary.


A simpler method would be to store a document variable in the template
containing the code (or in normal.dot). Or store the variable in a text
file, using ordinary input/print statements. Or even in the registry, for
that matter.

Thanks for your help, but I'm new to VBA programming and lost looking at
the
[quoted text clipped - 30 lines]

End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200511/1

.



Relevant Pages

  • RE: Resetting of the dataset
    ... I don't think there is a way to make fetchrow_arrayreverse the sequence ... You can always store the data in a variable if ... if you are receiving rows of data from ... the database in an order that makes it hard to work with you may want to try ...
    (perl.beginners)
  • Re: database protection
    ... You have to remember that Access is designed to be used my multiple users at ... the same time and, thus, there are fewer reasons to want to do that. ... You could also store the database in a hidden share on the ...
    (microsoft.public.access.security)
  • RE: Merging with Word
    ... You state that your application is not a "spilit" database application. ... you have multiple users and you are attempting to have everyone ... There is no reason for not splitting an application when there are going to ... what I tried is to have Access open a Word Doc and fill in the ...
    (microsoft.public.access.modulesdaovba)
  • Re: Choosing a Windows Database
    ... >> use some kind of relational database. ... >> multiple users can access and something scalable and fast. ... >> ADO.NET or ODBC provider. ... >> out there using the DBF type files. ...
    (microsoft.public.vb.database)
  • Re: Network
    ... I was planning to load the database on to the server and have ... it is not *recommended* to have multiple users in the same ... The "best practice" is to split the application into a data file (tables ... not recommend that if the data is mission critical and I would certainly ...
    (microsoft.public.access.gettingstarted)