Replacing Field Data (1 Viewer)

k209310

Registered User.
Local time
Today, 08:31
Joined
Aug 14, 2002
Messages
185
Ok one more question...

How can i select a field from a database and relace whats written in a the field using SQL (i really have no clue about databases and SQL)

Thanks again if you help me.
 

ColinEssex

Old registered user
Local time
Today, 08:31
Joined
Feb 22, 2002
Messages
9,118
Use an update query. Run it the same way as you did the other one

Col
 

k209310

Registered User.
Local time
Today, 08:31
Joined
Aug 14, 2002
Messages
185
im haiving problems with the update statement. There is nothin in ghelp

i have this but i keep getting told that i have a syntax error. Am i going about this the right way?

UPDATE [tblTest].[Melt ID/Tube ID] = '1324A'
WHERE [Melt ID/Tube ID]="DONE";
 

ColinEssex

Old registered user
Local time
Today, 08:31
Joined
Feb 22, 2002
Messages
9,118
Why not use an update query and run it in Vb with the DoCmd.OpenQuery?

If you write it in Vb you'll need to Dim the recordset and use a Do loop

Col
 

k209310

Registered User.
Local time
Today, 08:31
Joined
Aug 14, 2002
Messages
185
Thats wht i was planning on doing but im am having trouble getting the update staement to work at all. I have limited experience of SQL so am trying to work it out. Is there an easy way to do this rather than writing it in SQL?
 

ColinEssex

Old registered user
Local time
Today, 08:31
Joined
Feb 22, 2002
Messages
9,118
Can you not create the query in design view using the query grid?

Col
 

k209310

Registered User.
Local time
Today, 08:31
Joined
Aug 14, 2002
Messages
185
i have managed to do this now thanks colin. I wasnt sure how to design an update using the design grid so i had to write it out. Thats where i was having the problems.

Thanks for all your help thias morning I hope I can repay the favour sometime. (I may be back yet tho)
 

Users who are viewing this thread

Top Bottom