Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Text Box to a Check Box

Author  Topic 

joe8915
Starting Member

3 Posts

Posted - 2010-03-09 : 13:34:07
First my I say this is my first post and very new to SQL and I mean very new.
Ok here it goes
When adding a new field in the SQL Server Management Studio side, I would like it to be a Check Box but it comes out to be a Text field on the Ms Access side, when I finish linking the table.

So I guess my question if it comes over to the MS Access side as a Text Box, how do I change to make it a Check Box?

I hope I made some kidna sense here.

Thanks for any future help

jd

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-03-10 : 08:07:00
I'll take a crack at this since no one else has. There are no check boxes in SQL Server Management Studio. The check boxes you see in Access are formatting for a boolean data type. You can use a bit data type in SQL Server that Access can then format into a check box. Hope this helps.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

joe8915
Starting Member

3 Posts

Posted - 2010-03-10 : 08:50:11
jimf, thanks for the quick reply:

Ok, let me see if I get this correct. Since I have migrated my access db to SQL, all my chk bxs go to a bit format, which then put them in a Txt format. Then I have to format them back as a ck bx in access. I just reviewed my db since the migration and all of my chk bxs goes has been converted to a txt format, which really is a bummer. Just seems really odd, but maybe thats how SQL works.

Sounds like I have a lot of work ahead of me.
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-03-10 : 09:01:30
Why would you migrate data From Access to SQL Server and then back into Access? When you're migrating from Access to SQL Server, you should first create the table on SQL Server and specify what data type you want each field to be, and then insert the records from Access in to it. You may need to write some code to convert your check boxes into something SQL understand.
If you don't explicitly say what each field should be, SQL will makes guesses as to what the data type should be, and won't always be right.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2010-03-10 : 09:24:36
Are you meaning a Check box on a MS access form
Go to Top of Page

joe8915
Starting Member

3 Posts

Posted - 2010-03-10 : 09:40:56
jimf/NeilG, thanks for the input.
Guys very new at this, so bare with me. When I migrated my db to SQL, of course it created all the tables in SQL. Now since all my chk bx went to a txt format, some how I have to convert all the fields back to my db side as a chk bx instead of a txt bx. Sorry I didn't explain it some what more clear.

Yes NeilG on the MS access form. When the migration completed it formated the bxs as -1 or 0. Does that make any since at all. Boy I will be gald when my class starts next week. I am so new at this.
Go to Top of Page
   

- Advertisement -