By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

'create table' not coping with /

P: n/a
Hi,

I am trying to roduce a database for teachers to write comments about the
work students have done, and both print them on labels and store them. I
start with a table containing students names and their classes. I want the
software to produce separate tables for each class the teacher teaches.
(The reason for this is that dffernet classes will have different need for
the marking (sometimes memo fields, sometime numeric.) The Management
information system labels the classes in the format 7r/Ma4 etc. The string
'Markbook' gets assigned the 7r/Ma4. Infortunately the following produces
an error, and I've put it dow to the forward slash.

MySql = "CREATE TABLE " & MarkBk & " (ID Integer, Mark1 TEXT);"
DoCmd.RunSQL MySql

Yet I can make a table 7r/Ma4! The above code works if it is 7r\Ma4!

What's wrong?

Thanks in advance.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sat, 22 Oct 2005 18:37:48 +0100, "JohnM" <jo**@jmawer.demon.co.uk> wrote:
Hi,

I am trying to roduce a database for teachers to write comments about the
work students have done, and both print them on labels and store them. I
start with a table containing students names and their classes. I want the
software to produce separate tables for each class the teacher teaches.
(The reason for this is that dffernet classes will have different need for
the marking (sometimes memo fields, sometime numeric.) The Management
information system labels the classes in the format 7r/Ma4 etc. The string
'Markbook' gets assigned the 7r/Ma4. Infortunately the following produces
an error, and I've put it dow to the forward slash.

MySql = "CREATE TABLE " & MarkBk & " (ID Integer, Mark1 TEXT);"
DoCmd.RunSQL MySql

Yet I can make a table 7r/Ma4! The above code works if it is 7r\Ma4!

What's wrong?

Thanks in advance.


Generally, you don't want to be creating tables as a normal part of the
operation of a program, you want to create tables up-front, and add records to
thos tables. If you create separate tables based on data, then you can't do
things like have a single report that can print data for any class - you'd
have to change the report design.

I would do something like this...

tblClass
ClassID (Autonumber, Primary Key)
ClassName (Text, e.g. "7r/Ma4")

tblClassMark
MarkID (Autonumber, Primary Key)
ClassID (Long Integer)
MarkNum (Integer)
MarkText (Memo)
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.