[Gllug] Visual Basic Help

Wulf Forrester-Barker wulf.f-b at uhl.nhs.uk
Thu Jul 5 15:14:14 UTC 2001


Harry <HJackson at colt-telecom.com> wrote:

> Yes its for the back of a Form in Access. I have tried
> various things to get the loop to go through each record.
> The loop works but it does not append the data to the
> the table.

A snippet from your code sample was:

>        Forms!REMEDY!SPR2 = SecondWord
>        Forms!REMEDY!SPR3 = ThirdWord
>        Forms!REMEDY!SPR4 = FourthWord
          
Am I right in thinking that you're writing the information you have extracted from the original field into three separate data controls called SPR2, 3 and 4? Are these controls bound into fields on the table? If not, I think you are just writing into a temporary area which is refreshed every time the form moves to the next record. But take everything I say with a pinch of salt - it's been a long time since I last played with forms in Access (at least 12 months..).

> I drop the data into a .csv and then auto load it into access
> adding the other columns necessary using a macro...

I don't suppose that for the project you are working on you could just drop the data into a .csv file, process it with command like sed and awk (I bought O'Reilly's 'sed & awk' book yesterday, so I'm getting into what they can do) and then reload the improved data back into Access? Or how about accessing the table via a web page and applying suitable updates to each record using scripting commands? Or, if you need to stick within Access, writing a module which opens a recordset to perform the operation you need (as you would open a record set using a web scripting page), tying the execution of the module to a button on a form and running it like that? (you could always display the updated data after it has been transformed).

I guess that what I'm really driving at is to examine whether the tool you have chosen (VBA on an Access form) is really the best tool for the job (transforming data that is persisted in an Access database). Mind you, as they say, IT is about finding the right wrench to bang the screw in with....

Wulf




wulf.f-b at uhl.nhs.uk

**********************************************************************
DISCLAIMER:

Any opinions expressed in this email are those of the individual and
not necessarily the Trust. This email and any files transmitted with
it are confidential and intended solely for the use of the individual
or entity to whom they are addressed. Any unauthorised disclosure of
the information contained in this e-mail is strictly prohibited.

The contents of this email may contain software viruses which could
damage your own computer system. Whilst we have taken every
reasonable precaution to minimise this risk, we cannot accept liability
for any damage which you sustain as a result of software viruses.
You should therefore carry out your own virus checks before opening
the attachment.

If you have received this email in error please notify the sender or
postmaster at uhl.nhs.uk. Please then delete this email.

University Hospital Lewisham
Tel: 020 8333 3000
Web: www.uhl.ac.uk
**********************************************************************

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list