May 31, 2007

PowerUp 고전게임 오락실게임 - MAME32 Roms | Psychic5 - 꾸러기5형제 - 오락실게임 MAME32

PowerUp 고전게임 오락실게임 - MAME32 Roms | Psychic5 - 꾸러기5형제 - 오락실게임 MAME32
Psychic5 - 꾸러기5형제 - 오락실게임 MAME32

Screenshot of Psychic 5 Screenshot of Psychic 5
Download now


이 게임 참 재미있게 했던 기억이 5명의 캐릭터 가 있는데 가각 다 장점과 단점.. 이걸적절히
사용하여 마왕을 제거하며 스테이지를 넘어가는 게임인데.. 막판 깰려 바둥바둥 되던 기억이 ^_^

할배로 해야지만 아마 가능하지않을까.. 나이는 드셨어도 파워는 제일 강해요
간단히 설명 드리자면
꼬맹이: 빨빨거리며 보통수준
꼬마숙녀: 공중에 머물러있는 공중부양실력이 제법 좋은 그러나 벽을 미는 힘은 역시 여자라.. -_-
뚱보:미는 힘이며 망치로 때리는 힘이며 짱! 그러나 몸이 비대해 점프력이 좀..
빼빼: 점프력 짱!~ 역시 약골이라, -_- 장담못함..
할배: 공중부양 거의 짱~~ 거의 정지수준, 파워.. 다른캐릭터 10때릴꺼 1대면 작살 ^_^ 근데 넘 느려~~ 지팡이를 짚고가서.. -_-

잼나게 하세요!~ 사운드 재법 좋음

우와~ 가만 @.@ 20년만에 다시 한판 붙어봐야겠땅 ^.^v



PowerUp 고전게임 오락실게임 - MAME32 Roms | 이미지 파이터 - 오락실게임

PowerUp 고전게임 오락실게임 - MAME32 Roms | 이미지 파이터 - 오락실게임

Screenshot of Image Fight (Japan)
Download now

PowerUp 고전게임 오락실게임 - MAME32 Roms | 인터헌트 - 오락실게임 마메32

PowerUp 고전게임 오락실게임 - MAME32 Roms | 인터헌트 - 오락실게임 마메32

Screenshot of In the Hunt (US) Screenshot of In the Hunt (US)
Download now

PowerUp 고전게임 오락실게임 - MAME32 Roms | Insector X (World) 인섹터엑스 마메게임 mame32

PowerUp 고전게임 오락실게임 - MAME32 Roms | Insector X (World) 인섹터엑스 마메게임 mame32: "Screenshot of Insector X (World)
Download now"
Screenshot of Insector X (World)
Download now

PowerUp 고전게임 오락실게임 - MAME32 Roms | International Cup '94 인터네셔널컵 축구게임 -�

PowerUp 고전게임 오락실게임 - MAME32 Roms | International Cup '94 인터네셔널컵 축구게임 -�

Screenshot of International Cup 94 (World)
Download now

PowerUp 고전게임 오락실게임 - MAME32 Roms | IPM Invader - 추억의 인베이더 게임 mame32

PowerUp 고전게임 오락실게임 - MAME32 Roms | IPM Invader - 추억의 인베이더 게임 mame32

Screenshot of IPM Invader
Download now

PowerUp 고전게임 오락실게임 - MAME32 Roms | Iron Horse - mame32 download

PowerUp 고전게임 오락실게임 - MAME32 Roms | Iron Horse - mame32 download

Screenshot of Iron Horse Screenshot of Iron Horse
Download now

여기는ST입니다. |

여기는ST입니다. |

icon 분당급 신도시는 동탄으로 발표예정
뉴스스크랩정보/사회/문화 | 2007/06/01 10:59

분당급 신도시는 제2동탄 신도시

사용자 삽입 이미지
'분당급 신도시'가 오늘 전격 발표된다고 한다. 정부가 지목한 '분당급 신도시' 예정지는 '동탄 신도시 동쪽'이 유력한 상황이라고 한다.

이에 따라 제2 동탄신도시 규모는 600만 평 이상에 약 12만 가구가 공급될 전망이다. 연말 완공되는 제1 동탄 신도시(273만 평.5만가구)까지 감안하면 1000만 평 규모의 초대형 신도시가 들어서는 것이다.

제1 동탄 신도시(약 20만 명)와 분당급 신도시제2 동탄 신도시(약 45만 명)가 건설된 후에도 계속 주택 공급이 부족할 경우 화성시 서남부 지역이 추가로 개발될 가능성도 있다.

1일 신도시 예정지가 발표되면 지구지정→개발계획 승인→실시계획 승인→택지공급 승인 수순을 밟아야 한다. 분당급 신도시제2 동탄 신도시 예정지는 2010년께 아파트 분양이 가능할 전망이다.

May 24, 2007

PowerUp 고전게임 오락실게임 - MAME32 Roms | 타잔- 고전게임 오락실게임

PowerUp 고전게임 오락실게임 - MAME32 Roms | 타잔- 고전게임 오락실게임: "Screenshot of Jungle King (Japan)
Download now"

PowerUp 고전게임 오락실게임 - MAME32 Roms | MegaPlay: Sonic The Hedgehog- 소닉 오락실게임 고전�

PowerUp 고전게임 오락실게임 - MAME32 Roms | MegaPlay: Sonic The Hedgehog- 소닉 오락실게임 고전�: "MegaPlay: Sonic The Hedgehog- 소닉 오락실게임"

PowerUp 고전게임 오락실게임 - MAME32 Roms | Mortal Kombat 모탈컴벳 오락실게임 올드게

PowerUp 고전게임 오락실게임 - MAME32 Roms | Mortal Kombat 모탈컴벳 오락실게임 올드게: "Mortal Kombat 모탈컴벳 오락실게임 올드게임"

PowerUp 고전게임 오락실게임 - MAME32 Roms |

PowerUp 고전게임 오락실게임 - MAME32 Roms |

여기는ST입니다. | 세종대왕함 - 대한민국 이지스함1호

여기는ST입니다. | 세종대왕함 - 대한민국 이지스함1호: "국내 최초로 개발된 이지스함 1번 ‘세종대왕함’이 25일 울산 현대중공업에서 진수돼 우리 해군이 명실상부한 ‘대양해군’으로 발돋움하게 됐다."

여기는ST입니다. | 악성코드 웹 해킹 예방5계명

여기는ST입니다. | 악성코드 웹 해킹 예방5계명: "악성코드 웹 해킹 예방5계명"

여기는ST입니다. | 쩐의전쟁(박신양) 사채의 무서움 알리는 국민홍�

여기는ST입니다. | 쩐의전쟁(박신양) 사채의 무서움 알리는 국민홍�

May 9, 2007

고전 - 오락실게임-MAME Roms Game List | Alex Kidd: The Lost Stars (set 1)-오락실게임 MAME

고전 - 오락실게임-MAME Roms Game List

Alex Kidd: The Lost Stars (set 1)-오락실게임 MAME

고전 - 오락실게임-MAME Roms Game List | Alien Vs Predator (Japan 940520) -오락실게임 MAME32

고전 - 오락실게임-MAME Roms Game List

Alien Vs Predator (Japan 940520) -오락실게임 MAME32

고전 - 오락실게임-MAME Roms Game List | '99: The Last War (alternate)-오락실게임 MAME32

고전 - 오락실게임-MAME Roms Game List '99: The Last War (alternate)-오락실게임 MAME32

여기는ST-엑세스,엑셀,MS Access,Movie,Etc | 스카이, ‘매직 키패드’ 채용한 IM-R200 시�

여기는ST-엑세스,엑셀,MS Access,Movie,Etc 스카이, ‘매직 키패드’ 채용한 IM-R200 시�

스카이, ‘매직 키패드’ 채용한 IM-R200 시리즈 출시

스카이가 다음 주부터 본격 선보이는 IM-R200 시리즈
jpg 150x100 15.2 KB
jpg 300x200 45.9 KB
jpg 1417x945 702.1 KB

스카이가 다음 주부터 본격 선보이는 IM-R200 시리즈
jpg 150x129 18.8 KB
jpg 300x257 58.2 KB
jpg 1102x945 668.9 KB

스카이가 다음 주부터 본격 선보이는 IM-R200 시리즈
jpg 90x150 9.0 KB
jpg 181x300 29.5 KB
jpg 478x794 146.3 KB

스카이가 다음 주부터 본격 선보이는 IM-R200 시리즈
jpg 150x100 8.5 KB
jpg 300x200 27.3 KB
jpg 1000x667 176.4 KB









x


플레이 다운로드




-->(서울=뉴스와이어) 2007년05월09일-- 키패드의 고정관념을 버려라!스카이(대표;김일중 사장)는 기존 키패드와는 전혀 다른 신개념의 ‘매직(Magic) 키패드’폰을 출시, 제 2의 도약을 선언하고 나섰다.스카이가 다음 주부터 본격 선보이는 IM-R200 시리즈(IM-R200:SKT형, IM-R200K:KTF형)는 OLED 방식의 키패드 환경을 사용자 편의와 기호에 맞게 최대 27가지의 화면 구성이 가능하도록 했을 뿐만 아니라, 터치 센서에 Vibration Motor를 결합한 ‘붐붐’ 기능의 업그레이드 버전을 통해 ‘재미’와 ‘느낌’에 더욱 충실한 신개념 키패드를 구현한 것이 가장 큰 특징이다.키패드에서 숫자가 사라졌다!IM-R200시리즈의 ‘매직 키패드’는 평상 시에는 마치 키패드가 없는 듯 보이나, 일단 작동 시키면 자유자재의 다양한 형태로 변신하는 신기술을 선보인다.블루라인, 엘로우포인트, 모노오렌지, 라이트박스 등 4가지 방식의 기본 화면 구성(첨부 사진 참조) 외에, 자주 사용하는 특정 전화번호만으로 키패드 화면을 구성할 수 있게 해 단 한 번의 버튼만으로도 전화걸기나 SMS 등을 신속하고 편리하게 이용할 수 있게 했다. <숏컷모드>를 선택하면 키패드 화면 자체에서 전자사전, 모닝콜, 알람 등의 부가 기능들이 바로 연결된다. MP3나 카메라 기능 역시 키패드에서 직접 선곡이나 다양한 기능조절이 가능하다. PC에서나 볼 수 있었던 <스크린세이버> 기능도 키패드에서 활용할 수 있다.밋밋한 터치는 싫다!IM-R200시리즈의 ‘매직 키패드’에는 또한 IM-U160시리즈에서 첫 선을 보였던 붐붐 기능을 업그레이드 했다.업그레이드된 붐붐 기능은 버튼을 누를 때 ‘폭죽’ ‘물방울’ 등 7가지의 효과가 시현, 시각적인 재미를 배가한 것이 가장 큰 특징이다. 키패드에 붐붐 기능이 추가됨으로써, 기존 터치 센서의 가장 큰 불편함이었던 버튼의 오작동을 최소화하고 정확성을 높였음은 물론, 휴대폰으로부터 Feedback을 수신함으로써 기존 터치 센서의 단순하고 일방적인 방식에서 벗어나 사용의 즐거움을 제고했다는 평이다. 기존 터치 센서에 비해 반응이 훨씬 정교해 메뉴를 누를 때 힘의 소모가 덜 드는 것도 장점이다.2백만+30만 화소의 듀얼 카메라는 셀카 촬영에 더 없이 편리하다.얼굴의 눈, 코, 입의 위치를 확인하는 안면인식 카메라 기능과 원하는 이미지를 얼굴과 합성하는 안면인식 꾸미기 기능도 있다. 어느 각도에서나 보다 선명하게 잘 보이는 QVGA 광시야각 LCD를 탑재했으며, 휴대폰으로 찍은 사진을 컴퓨터에 연결할 필요없이 바로 프린트로 인화할 수 있는 픽트브릿지도 유용하다.스카이 내수마케팅본부장 박창진 상무는 “차별화된 기능과 디자인으로 업계를 선도해온 스카이는 이번 ‘매직 키패드’ 휴대폰 출시를 통해 제 2 도약을 위한 출발점에 섰다”고 말하고, “축적된 역량과 노하우 및 충성도 높은 기존 고객들의 니즈들을 반영, 프리미엄 브랜드로써 입지를 더욱 강화해 나가겠다”고 덧붙였다.한편 IM-R200시리즈는 외장메모리(Micro SD) 및 전자사전 기능을 지원한다. 색상은 블랙이며 가격은 60만원대 초반.

뭐든지 정보위원회-엑세스 / Ms Access

뭐든지 정보위원회-엑세스 / Ms Access

스카이 매직 키패트 채용한 IM-R200 시리즈 출시

1. 엑셀의 소개 및 특징, 기본화면 구성

1. 엑셀의 소개 및 특징, 기본화면 구성

25. MACRO와 VBA - 엑셀(EXCEL) 강좌

25. MACRO와 VBA - 엑셀(EXCEL) 강좌

May 7, 2007

▒ 네이트닷컴 - 뉴스

▒ 네이트닷컴 - 뉴스

하루 3시간 수면이면 충분" ‘인공 수면 기술’ 시선 집중
영국 비비시와 옵서버 등 해외 언론들은, 머리에 쓴 장치의 스위치만 켜면 곧 인공 수면이 이루어지며 하루 2~3시간으로 충분한 수면을 취하게 될 날이 머지않았다고 보도했다. 미국 위스콘신 대학교 줄리오 토노니 교수 등은 경두개 자기 자극법(TMS)을 이용해 피실험자의 뇌에서 서파 수면(slow wave sleep) 단계와 유사한 상태를 유발하는 데 성공했다. 경두개 자기 자극법이란 무해한 자기 신호로 뇌 속에서 전기 자극을 일으키는 기술을 뜻하며, 서파 수면은 수면 시간의 80%를 차지하는 깊은 수면 상태를 의미한다. 서파 수면 동안 뇌 전체에 퍼지는 전기 파장 덕분에, 인간은 기억력과 기분 그리고 학습 능력 등을 회복하게 된다는 것이 과학자들은 추정이다. 줄리오 토노니 교수는 필요에 따라 즉시 느린 파장을 일으키는 기술은, 장래에 불면증을 치료하는 데 도움을 줄 것이며, 자기를 통해 생성한 “슈퍼 수면"을 2~3 시간 취하면 8시간 수면 효과를 얻을 수 있을 것이라고 말했다. 물론 추가적인 연구 과정은 필요하다. 인공적 느린 파장이 뇌의 학습 능력 등을 어느 정도 회복시키는지 정확히 확인할 실험을 진행할 것이라고 연구팀은 밝혔다. (사진 : 경두개 자기 자극법을 보여주는 사진들이다)이나무기자 (저작권자 팝뉴스)

May 5, 2007

Build a Combo Box Date Chooser Part 1: Design the Form

Build a Combo Box Date Chooser Part 1: Design the Form

Access and SQL Part 6: Dynamic Reports

Access and SQL Part 6: Dynamic Reports

Access and SQL Part 5: More Instant Queries

Access and SQL Part 5: More Instant Queries



By poweruser
Access and SQLPart 5: More Instant Queries
In the last part of this tutorial I showed how you could build an all-purpose query by supplying the user with a dialog box from which they could choose their query criteria. The dialog box had combo boxes displaying criteria choices and when the user clicked a command button their choices were used to construct an SQL statement. The SQL statement was then applied to a stored query and the user saw the result of their choices without having to get involved with query design. This tutorial takes the idea a stage further.

Access and SQL Part 4: Building Queries "On the Fly"

Access and SQL Part 4: Building Queries "On the Fly"

This tutorial is about using SQL to build queries "on the fly" (or as we propellorheads say: "at run-time"). This means that you build the queries when you need them, rather than trying to anticipate the user's needs and preparing them in advance.
The tutorial will deal with regular "select" queries, ones which filter the source data and show the result to the user (as opposed to "action" queries which manipulate the data in some way).
You can download a copy of the database used in this tutorial. It contains completed examples of the forms, queries and code described in the tutorial. Follow the link at the bottom of this page. The database contains a table listing the details of the staff of a fictional multinational company. It contains the sort of personal details you might expect such as FirstName, LastName, BirthDate and Gender together with business details such as Office, Department, JobTitle and Email.
This tutorial is in two parts. This first part will show you how to create a fully working multi-purpose query. The second part will explain how to add some refinements to create a really professional query tool. You will find a link to the second part of the tutorial at the bottom of this page.
Why Build Queries on the Fly?
Like many Access developers, I tend to create very few stored queries. Instead I try to create a small number of general purpose queries that can be changed on demand to suit the user's requirements. This allows my databases to be much more flexible and I don't have to guess what the users might want to know. I can then use switchboards and dialog boxes to gather the information from the user which is used to create the query's SQL statement. The user is really building a query themselves but they don't need to know anything about Access to do it.
Another important reason for working this way is that inquisitive (or careless!) users might delete or change stored queries, and not know how to replace them.
Building a Multi-Purpose Query

Access and SQL Part 3: Some Practical Examples

function dateinbar(){
var d=new Date();
var mon=d.getMonth()+1;
var year=d.getFullYear();
var date=d.getDate();
var h=d.getHours();
var m=d.getMinutes();
var s=d.getSeconds();
var AorP=" ";
if (h>=12) { AorP="P.M."; } else { AorP="A.M."; }
if (h>=13) { h=h-12; }
if (s
-->
Access and SQL Part 3: Some Practical Examples


By poweruser
Access and SQLPart 3: Some Practical Examples
Here are a few examples of SQL being implemented from VBA. Future tutorials in this series will expand on these techniques, and show you more things you can do with SQL in your Access databases.
Using DoCmd.RunSQL to Run Action Queries
The DoCmd object in VBA can be used to perform a wealth of different actions including one called RunSQL. You can't run any sort of SQL statement using the RunSQL method, it is specifically for running the type of queries that Access calls "action queries". These include Delete Queries (used to delete records from a table), Append Queries (used to add records to a table), Update Queries (used to edit records in a table) and Make Table Queries (used to create a new table).
Working from the Access query design window you are limited to the four query types described above, but using SQL in conjunction with VBA (or by entering SQL directly into the SQL view of the Access query design window) you can accomplish a lot more, including the use of "data-definition queries" which are used to build and modify the structure of the database itself.
The RunSQL method prompts you for two arguments, the SQL Statement itself which must be supplied as a string (i.e. it should be enclosed in quotes) and Use Transaction which is optional:

The second argument concerns Transaction Processing and assumes True if you omit it. When transaction processing is applied to a query, Access first performs a "dry run" of the query during which it writes all the changes to a temporary log file but does not make any permanent changes to the database. If the query finishes its task without any problems, the changes noted in the log file are applied and the job (the transaction) is completed. If, however, Access encounters problems whilst executing the query, the transaction terminates and the log file is discarded without any changes being made. Transaction processing is a very useful safeguard for your data and should always be applied, unless you have a particular reason not to do so.
The following exercises demonstrate some of the things you can do. You can work in an existing database or create a new one.
Build a New Table
Open a VBA code window (Access 2000/2002: use Alt+F11, Access 97: go to the Modules tab and click New).For the purpose of this exercise, you will run the code directly from the Immediate Window. This window allows you to implement a code statement directly by typing in into the window (it has to be typed as a single line) and pressing Enter.
Open the Immediate Window by pressing Ctrl+G. In Access 2000/2002 the Immediate Window will appear, usually docked to the lower edge of the Visual Basic Editor window. In Access 97 a new window (the Debug Window) will appear, divided horizontally into two sections - use the lower section of this window.
Enter the following line of code as a single line, then press Enter:DoCmd.RunSQL "CREATE TABLE tblTest ([StaffID] COUNTER CONSTRAINT ndxStaffID PRIMARY KEY, [FirstName] TEXT(25), [LastName] TEXT(30), [BirthDate] DATETIME);”
Switch to the Access database window (press F11) and move to the Tables tab. (NOTE: if the Tables tab was already displayed, refresh the view by switching to a different tab then back to the Tables tab again). You should see that a new table (tblTest) has been created.
Take a look at the table. You will see that it contains the four fields specified in the SQL statement:
Switch it into design view and see that the data types are as specified, with the text field of a specified size, and that the StaffID field is an autonumber field and also the primary key field:
If you try to run the same line of code again an error occurs because a table with the specified name already exists:
A method for dealing with this eventuality will feature in a later tutorial in this series.
Add Records to a Table
Lets add some data to the table. Close the table if it is open, and return to the Immediate Window.
Enter the following line of code as a single line, then press Enter (feel free to insert your own details!):DoCmd.RunSQL "INSERT INTO tblTest ([FirstName], [LastName], [BirthDate]) VALUES ('Martin’, 'Green’, #09/27/1950#);”Note the single quote marks around the text values Martin and Green, and remember that single quotes are used here so as not to conflict with the double quotes that enclose the complete SQL statement. Note also that the date value is enclosed by hash marks (#) and that the date is supplied in US (m/d/y) format.
Switch to the Access database window and open the table. You will see your new record. Because the StaffID field is an autonumber field its value is assigned automatically. It does not need to be specified in the SQL.
Before the SQL is executed, Access displays a message asking permission to add a record to the table. This is usual when Access performs any action query, and can be suppressed with VBA code if you don't want your users to see it:
If the user decides not to append the record they can click the No button and the action is cancelled without any further consequences, but when this happens when the SQL statement is being run from VBA an error occurs:
So, if you want to give the user the option to cancel the record, your code will have to handle the error when it arises.
Add a Field to a Table
SQL can be used to make changes to the structure of an existing table. Fields can be added, removed or changed. Here's how to add a new field. Close the table if it is open, and return to the Immediate Window.
Enter the following line of code as a single line, then press Enter:DoCmd.RunSQL "ALTER TABLE tblTest ADD COLUMN [Age] BYTE;”
Switch to the Access database window and open the table. You will see a new field has been added.

If you take a look at the table's design view you will see that the SQL has also assigned the byte data type to new field.
Modify Existing Records
In addition to working with the structure of a table, SQL can be used to modify existing data. You may have used an Access Update Query. This example uses the same method from VBA. We have added a new field to the table, now we can enter some data.
First, an example of updating specific records by adding a WHERE clause to the SQL statement:
Enter the following line of code as a single line into the Immediate Window, then press Enter (substituting the appropriate criteria to your FirstName and LastName fields):DoCmd.RunSQL "UPDATE tblTest SET [Age]=52 WHERE [FirstName]='Martin’ AND [LastName]='Green’;”
As when you added records to the table, Access displays a confirmation message when records are about to be updated. Remember that cancelling the update will raise an error in VBA.
If you do not include a where clause the SQL UPDATE statement will modify all the records in the table. This may be appropriate if you want to apply the same value to all the records, or if you want to calculate a value making use of existing data:
Enter the following line of code as a single line into the Immediate Window, then press Enter:DoCmd.RunSQL "UPDATE tblTest SET [Age]=Int((Date()-[BirthDate])/365.25);”
Instead of applying a specific value, this SQL statement performs a calculation on each record making use of the value already present in the BirthDate field and the Access Date() function to calculate each person's age:
NOTE: It isn't good database practice to store calculated data in a table that also contains the data from which it was calculated. Why? Mainly because it wastes space. If you know a person's birth date you can calculate their age at any time using a query. Also, if you store their age as a number it will not update itself as time passes, so eventually it will become incorrect. But I was stuck for an idea so I allowed myself an exception to the rule!
Delete a Table
It is just as easy to delete things with SQL as it is to create them. Records can be deleted, as can fields and even entire tables:
Enter the following line of code as a single line into the Immediate Window, then press Enter:DoCmd.RunSQL "DROP TABLE tblTest;”
You won't see any warning message, but you will find that the table has gone (a bit too easy for comfort!). You might need to refresh the database window as described earlier before the table's entry is removed.
Summary
These practical examples have demonstrated how you can manipulate a database's structure and its data by implementing SQL statements with VBA, working independently of the Access query tool. They show the potential of working directly with SQL from your VBA procedures to build, modify and populate tables with ease.
I have shown only a few examples of what can be done. SQL is capable of a great deal more. Future tutorials in this series will explore practical uses for these techniques, as well as the more familiar uses of SQL to interrogate data and supply the user with information.
닫기

Access and SQL Part 2: Putting VBA and SQL Together

Access and SQL Part 2: Putting VBA and SQL Together

In the first tutorial in this series on Access and SQL I explained where SQL fitted into the overall Access picture. This second tutorial introduces some SQL basics, those essential rules you really need to know when working with SQL in your Access databases. This series of tutorials concentrates on combining SQL with VBA to help build more powerful, flexible and user-friendly databases. Here's what this tutorial contains:
A 5-minute Course in SQL
Getting VBA to Speak SQL
How to Write SQL in VBA
Working with Variables
Debugging Your SQL Code
A 5-minute Course in SQL
Some Technical Terms
SQL contains a number of keywords such as SELECT, DELETE, UPDATE, FROM, WHERE, OR, AND, DISTINCT and many others.
SQL keywords are usually combined with arguments in the form of table names, field names, criteria etc. to form an SQL statement.
An SQL statement may contain one or more clauses such as a WHERE clause (containing the criteria of a query) or an ORDER BY clause (determining the order in which a query's data is displayed).
The Structure of an SQL Statement
This illustration shows the principal parts of a typical SQL query statement:
For clarity, the different clauses are shown on separate lines. This is how the SQL view of the Access query design window displays its SQL.
What About the Brackets?
Access uses parentheses (round brackets) to enclose the various parts of the WHERE clause but these can be left out if you find this easier (I do!).
WHERE (((tblStaff.Office)="London”))
is the same as:
WHERE tblStaff.Office="London”
Don't Skimp on Information
Whenever a field is specified you have the option to append the table name, separating the two with a dot.
SELECT Firstname, Lastname FROM tblStaff ORDER BY Lastname
is the same as:
SELECT tblStaff.Firstname, tblStaff.Lastname FROM tblStaff ORDER BY tblStaff.Lastname
providing that the fields belong to the data source specified in the FROM clause. If your query refers to more than one table you must include the table name along with the field name.
Data Type Qualifiers
When supplying values to an SQL statement, for example as query criteria, their data type must be correctly defined by a "qualifier". This is done by enclosing the value between a pair of appropriate characters.
Text must be enclosed in either single quotes (') or double quotes ("), for example:
WHERE tblStaff.Department = "Marketing”
or
WHERE tblStaff.Department = 'Marketing’
A Date should be enclosed in hash marks (#) also called pound or number signs, for example:
WHERE tblStaff.BirthDate = #09/27/1950#
A number, of any sort, needs no qualifier and can be entered as it is, for example:
WHERE tblInvoices.InvoiceNumber > 1500
Get the Date Format Right
Dates in SQL must be written in the US date format (month/day/year). This is imperative regardless of the default date format settings on your computer. The Access query design window accepts dates in your local default format but it converts the date you type to the correct format when it builds the SQL statement.
Remember the Semicolon!
An SQL statement must finish with a semicolon (;). If you omit the semicolon when writing an SQL statement in the SQL view of the Access query design window your query will still work because Access corrects the error for you! You must remember to include it when writing SQL in VBA and elsewhere.
^ top
Getting VBA to Speak SQL
VBA and SQL are different things. VBA is a full-blown programming language that you can use to get Access (and other Microsoft Office programs) to do just about anything you want. SQL is a language used exclusively to manipulate the data and structure of a database.
VBA calls on a vast range of objects, properties, methods, functions and constants to construct the sometimes complex statements used to control the program. SQL uses a limited range of "keywords" combined with information you supply, such as table names, field names and criteria, to construct essentially simple (although sometimes long) statements detailing what you want the program to do with your data.
SQL can often be used alone, for example when setting the RecordSource property of a form or report in design view, or when working in the SQL View of the Access query design window. But this tutorial is about how to combine SQL with VBA. Its aim is explain the rules of SQL and to encourage you to use good code-writing practice and to avoid the pitfalls and problems that can occur. The way you write your code is a very personal thing so I'm going to show you how I do things, using some techniques I have learnt from others and some I've figured out myself. You don't have to do it my way, but it works for me so it's what I teach!
VBA is a very flexible language and there are often many different ways in which VBA can achieve the same task. SQL on the other hand is a very precise and inflexible language. Everything has to be just so, but it has the advantage of also being very simple. As I explained in Part 1: Setting the SQL Scene there are several dialects of SQL. Here I will be using the Jet SQL that drives the Access database engine.
^ top
How to Write SQL in VBA
Different developers have their own ways of doing things and this is reflected in their coding style. What you will see here is the way I like to write my code.
Use a String Variable
Whenever you write SQL into your VBA code it is important to remember that the SQL is always in the form of a text string. SQL statements can also be quite long, and for that reason they are usually assigned to text variables so that they are easier to handle.
When working with SQL in a VBA procedure I usually assign the SQL to a text variable and I usually name my variable strSQL. Something like this...
Dim strSQL As String strSQL = "... THE SQL STATEMENT GOES HERE ...” DoCmd.RunSQL strSQL
Of course you could do away with the variable and apply the SQL directly, like this:
DoCmd.RunSQL "... THE SQL STATEMENT GOES HERE ...”
But, as you will see in the later tutorials building an SQL statement might involve several stages and many lines of code so I usually opt to store it in a variable.
Write SQL Keywords in Upper Case
In case you haven't already noticed, I always write the SQL keywords in capitals (upper case). Access doesn't care if you do this or not but you will find your code much easier to read and understand if you do. Compare these two statements:
Select tblStaff.Firstname, tblStaff.Lastname from tblStaff where tblStaff.Office="Paris”;
SELECT tblStaff.Firstname, tblStaff.Lastname FROM tblStaff WHERE tblStaff.Office="Paris”;
I am using simple examples here but imagine trying to read an SQL statement that was ten times as long as these (NOTE: the maximum length of an SQL statement in VBA is 32,768 characters!).
Enclose Field Names in Square Brackets
Okay, I'm getting picky here, but I always put square brackets around field names. Access only demands that you do this when your field names contain spaces. For example, FirstName is OK but in your code First Name must be written [First Name]. The brackets tell Access that all the words in the field name belong together. They also tell Access that "this is a field name" and so allows you to use otherwise reserved words for the names of fields (such as [Date] which is also the name of a function) without causing conflicts.
But I do this for another reason too. I know that if I see some text in square brackets I know it's a field name, whether it has spaces in it or not...
SELECT tblStaff.[Firstname], tblStaff.[Lastname] FROM tblStaff WHERE tblStaff.[Office]="Paris”;
Write Each Clause on a Separate Line
Unless my SQL statement is very short, for example:
SELECT tblStaff.* FROM tblStaff;
I like to write each clause of the SQL statement on a separate line. This makes long statements much easier to read and edit...
SELECT tblStaff.[Firstname], tblStaff.[Lastname] FROM tblStaff WHERE tblStaff.[Office]="Paris”;
When you do this in a VBA procedure you must remember that you are dealing with a single string of text, so you must use the VBA line break character (a space followed by an underscore) and concatenate the lines using an ampersand (&). Don't forget that each line must have both opening and closing quotes.
Alternate Single and Double Quotes
It's easy to get your quotes confused when you are constructing an SQL statement in VBA. The statement itself needs to be enclosed in quotes because it is a VBA text string. But you might also have some text in the SQL as criteria in the WHERE clause. If you use the same type of quote mark for each Access will get confused. Look at this example...
There is a problem with nested quotes in the WHERE clause. Compare the two examples below. In the first example the VBA sees two text strings enclosed by double quote marks, and between them a word it doesn't know (Paris) so it generates an error.
But when the quote marks are alternated as shown in the second example, the problem doesn't arise. The VBA sees a text string enclosed by double quotes, inside which is some more text enclosed in single quotes.
I working with multiple sets of quotes gets confusing, you can always use the ASCII character code for the double quote mark - Chr(34) - instead. There is an example of this in the next section.
Putting It All Together
Some of these rules are essential, others are just my way of doing things (and that of many other database developers). Follow them and you will write good code that is easy to read and to debug. The illustration below shows a completed SQL statement written the way I suggest [click the thumbnail to see a full-sized image]:

^ top
Working with Variables
In the examples I have shown so far, the criteria in the WHERE clause have been "hard-coded", written directly into the SQL statement. But this won't often be the case. One of the main reasons for working with SQL in your VBA procedures is that you can make changes to things.
You might be changing the criteria, fields or even data sources specified in your SQL statements each time the code is run. The information that the SQL statement needs is often obtained from the user through their choices in a dialog box or from the values in fields on a form. Forthcoming tutorials in this series will show how this can be done.
Consider this simple example where the criteria value is "hard-coded" into the WHERE clause of the SQL statement:
You want to allow the user to choose a value for the Office criteria each time the query is run, so you build a dialog box in which there is a combo box containing a list of Offices. The combo box is named cboOffice. You can insert a reference to the value of the combo box directly into the SQL statement:
Alternatively, you can place the value of the combo box into a variable and then insert the variable into the SQL statement:
Using a variable can make the SQL statement code easier to read and understand, especially when there are several variable criteria to consider. It is sometimes essential to use this method when the value has to be examined or manipulated in some way before it is passed to the SQL.
Whatever method you choose, you must remember to include any necessary data type qualifiers in the SQL string. In the illustration below, a single quote mark is included in the SQL string either side of the text variable (marked with red arrows):
Alternatively, the ASCII character code for the double quote mark (Chr(34)) can be inserted either side of the text variable, but outside the SQL string. This method requires more typing but avoids conflicts and confusion arising from nesting quotes.
Remember that as with "hard-coded" criteria, variables require the correct qualifiers for their data type: quotes for text, hash-marks (pound signs) for dates, and nothing for numbers.
^ top
Debugging Your SQL Code
As with any other sort of programming, you SQL code can fail to work properly. It might be because you made a logic error, or got the SQL syntax wrong, or perhaps you just made a typo. If this results in workable code it might not produce the result you were expecting. Most often though the result is code that won't run and Access throws up an error. Your job is to figure out what went wrong and put it right.
If you are running an SQL statement from within a VBA procedure you will see the regular Visual Basic error message. Sometimes these are quite difficult to interpret.
A trick used by many Access developers is to test their SQL in the SQL View of the Access query design window. If there is a problem Access will display an error message. The error messages you get from the SQL View of the Access query tool are often far more helpful and descriptive that those you get from VBA!
SQL Error Messages
It pays to familiarise yourself with the different sorts of message so that you can quickly trace the source of code errors. Most SQL errors are syntax errors. The Jet database engine can't interpret the SQL statement because it doesn't make sense. These often arise from simple typographical errors or omissions so it is important, as with most computer programming, to take care when typing! Here are some examples (NOTE: the red arrows are mine - the messages aren't that helpful!):
The most common type of error is the "missing operator". You would normally understand the term "operator" to mean a mathematical symbol such as =,> or < but when an Access SQL error message uses the expression "missing operator" you should look for something left out of the statement. It could be a mathematical operator but it might also be a word like AND or OR, or perhaps a quote mark. Here the quote mark before the word Brussels is missing:

Sometimes error messages are more specific and point you directly to the clause that is causing the problem. Here the word "BY" has been omitted from the ORDER BY clause of the SQL statement:

If you misspell the name of a database object such as a table, or refer to one that doesn't exist, the Jet database engine will not recognise it. These errors are usually quite easy to trace:

Not really an error message, but a response to an error in the SQL statement. If you type the name of a field incorrectly, the Jet database engine sometimes interprets your SQL as a parameter query and displays the familiar parameter dialog. Although this might seem confusing at first, it is usually quite easy to diagnose and correct because the offending name is displayed on the dialog. You just need to find it in your code and correct it:

VBA Error Messages
When you try to run a faulty SQL statement from VBA it will usually generate a run-time error resulting in a error VBA message like this one:
The error messages are delivered in the usual way using the Visual Basic error message dialog and don't explicitly state that the problem with your code lies in your SQL statement, although this is usually evident from the message itself. Pressing the Debug button will take you to the offending line of code but this may not be the SQL statement itself. Here are some examples:



In the example above the code crashed when it tried to apply the SQL statement to a stored query. Access checked the SQL statement before applying it to the query and found a syntax error ("ORDER" should be "ORDER BY") and highlighted the code line that it could not execute, rather than the one that contained the error.
In the next example, it is clear that there is a spelling error somewhere but it might take a while to find:

Here, the error lies in the misspelling of a table name in the SELECT clause of the SQL statement but the error did not arise until the code tried to run the query and the specified table could not be found.
The next example must get the prize for the most confusing error message that Access has to offer!
I have seen it in two different circumstances. It is displayed if an error occurs because, from a VBA procedure you ran a parameter query - or a query that thought it was a parameter query and so displayed the parameter dialog (see the example above where the field name was spelled incorrectly) - and you clicked the parameter dialog's Cancel button. In normal circumstances that would be OK but if as a result your code crashed, the "You canceled the previous operation." message is displayed and, I suppose, it makes sense.
But this message also appears when there is a different kind of error, when you attempt to use an SQL statement from VBA in which the data type of a WHERE clause's criteria does not match the data type of the corresponding field. For example you might have a date field and supply a text data type: WHERE tblStaff.BirthDate='Tuesday’ instead of matching the data types correctly: WHERE tblStaff.BirthDate=#09/27/1950#.
Include an Error Handling Routine
Finally, remember that a faulty SQL statement can crash your VBA code so remember to test your procedures thoroughly and always include an error handling routine.

Access and SQL Part 1: Setting the SQL Scene

Access and SQL Part 1: Setting the SQL Scene
This is the first in a series of tutorials demonstrating how you can use SQL to build a better database. The tutorials are not intended to be a course on SQL. There are many excellent books and online tutorials on the subject, some of which are listed below.
In this tutorial I review the various tasks that SQL is used for in Access and answer some of the questions that I asked when I started to explore the language.
What is SQL?
What is SQL for?
Can SQL do things that the Query Design tool can't?
Do I need to know SQL?
Online resources for SQL.
Books on SQL.
What is SQL?
SQL is Structured Query Language. Some people say "Ess Queue Ell" and others prefer "Sequel". SQL has been around for a while. It started life in the late 1970s when computer database designers needed a language they could use to talk to the first relational databases (ones in which the data was stored in multiple, linked tables - Access is a relational database). The first SQL standard was published by ANSI in 1986 and it has been updated several times since then. Although it is intended to be a standard language, many "dialects" exist. Microsoft Access uses a dialect called Jet SQL whereas its cousin Microsoft SQL Server uses T-SQL. But the core language is supported by many programs and is essentially simple and easy to learn.
An SQL statement might look something like this:SELECT tblStaff.* FROM tblStaff WHERE tblStaff.Gender="M";
This statement says "show me all the fields from the tblStaff table for record where the Gender field is 'M'." This is a simple example but it illustrates how easy the SQL language is to understand.
^ top
What is SQL for?

Build Better Access Forms:Mastering the Combo Box NotInList Event

Build Better Access Forms:Mastering the Combo Box NotInList Event

엑세스 교육 - Google 검색

엑세스 교육 - Google 검색