Access form to insert data in sql server table

ayh1

Registered User.
Local time
Today, 06:39
Joined
Dec 19, 2014
Messages
29
Hi does anyone know if theres any tutorials on how to create a form in access to insert/update/delete data from a table in sql server?
 
if you have a linked table to sql server, the form would be exactly the same as for an access table.

The only thing to be aware of is that when linking to the table you must specify the column(s) which is the unique ID for the record
 
Hi

I have created my form and can add to my table, how would i write an if statement or other constraint to check the the data is unique, for example I can only have one course date for one venue?

thanks
 
You should review some database terms, and perhaps watch/work through a few tutorials.
Here is a link re indexes and keys

Google Indexes and keys database
and "Preventing duplicates database"

Good luck
 
Last edited:
As jdraw says, perhaps an idea to work through some tutorials
I can only have one course date for one venue
You might handle this initially in the table, not the form. It would be handled by having a unique composite index for these two fields which would prevent duplicates being added to the table. Having done this you may still have some code to check for duplicates before inserting but this really depends on how you want your form to work - for example if the user enters a venue first, you could give them a list of available dates - i.e. excluding those that are not available.

And it also depends on how your table works - if someone has booked a course for 3 days, do you create a record for each day or one record with a startdate/enddate?
 

Users who are viewing this thread

Back
Top Bottom