User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 25 Nov 2005, 19:22   #1
Eidron
The Harsh Light of Day
 
Join Date: Jun 2001
Location: Behind my comp in Hertfordshire, UK
Posts: 101
Eidron is an unknown quantity at this point
M$ Access

I have to do a database in crappy M$ Access. Normally I use MySQL with a php interface but I cant here.

Is it possible to use some VB code to validate some information? I have some code to validate an ISBN number but no idea how to get it to work with the db. Any help would be appreciated. Thanks.

Also, how can I set a yes/no field in another table to yes when a record is created in another table?
__________________
"I am become death, the destroyer of worlds"

You'll never see me but I am everywhere

Last edited by Eidron; 25 Nov 2005 at 20:04.
Eidron is offline   Reply With Quote
Unread 26 Nov 2005, 03:07   #2
Eidron
The Harsh Light of Day
 
Join Date: Jun 2001
Location: Behind my comp in Hertfordshire, UK
Posts: 101
Eidron is an unknown quantity at this point
Re: M$ Access

I am playing with running SQL statements in macros after an update. Is it possible to use UPDATE so that it sets the value of "IsOnLoan" in table bookCopy to yes (I can do this) WHERE BookReference = (The value in a field on the form running the macro). Any help would be much appreciated. Thanks.
__________________
"I am become death, the destroyer of worlds"

You'll never see me but I am everywhere
Eidron is offline   Reply With Quote
Unread 27 Nov 2005, 15:50   #3
Eidron
The Harsh Light of Day
 
Join Date: Jun 2001
Location: Behind my comp in Hertfordshire, UK
Posts: 101
Eidron is an unknown quantity at this point
Re: M$ Access

I have the following SQL statement in the macro:

UPDATE bookCopy SET IsOnLoan =Yes WHERE
the WHERE staement is where I need the help. I want to tell it to update the record where "BookReference" = the value held in the textbox "BookReference" on the form Im using. Anyone?
__________________
"I am become death, the destroyer of worlds"

You'll never see me but I am everywhere
Eidron is offline   Reply With Quote
Unread 28 Nov 2005, 00:01   #4
Supernova9
m u p p e t
 
Join Date: May 2001
Location: Whenever Wherever
Posts: 477
Supernova9 is infamous around these parts
Re: M$ Access

Quote:
Originally Posted by Eidron
I have the following SQL statement in the macro:

UPDATE bookCopy SET IsOnLoan =Yes WHERE
the WHERE staement is where I need the help. I want to tell it to update the record where "BookReference" = the value held in the textbox "BookReference" on the form Im using. Anyone?
Doing this as VB code on the form?


set db = currentdb
strSQL = "UPDATE bookCopy SET IsOnLoan = Yes WHERE BookReference = " & Me.BookReference.Value & ";"
db.execute strSQL
__________________
Supernova9 is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 06:30.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018