English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The form should allow the user to check for rooms etc...pls help...'tis 4 a school project

2006-10-31 22:12:10 · 2 answers · asked by vev 2 in Computers & Internet Programming & Design

2 answers

You'll need a database to store the rooms in. The rooms will have an availability date (or a flag that says it is occupied). You can then write a front end which has a button on it to say "Display rooms that are not occupied". When this is clicked, a query is run to return a list of all rooms that are not currently occupied (indicated by the date or the flag or whatever). The query will return a list of rooms into a data grid (that are not allocated). You can then click on that room to allocate it. Additionally, you will need some sort of mechanism to deallocate a room when the occupants leave. This can be done by either providing a list of occupied rooms into an data grid or you can use a text box to enter the room number that you wish to deallocate.

Now, you don't mention how complex this system has to be. e.g. You may want to do forward booking of rooms. In this case, selecting by some sort of date mechanism would be the better option.

Hope this gives a basic overview of what you need to do. B.T.W. You could use XML as the database if you don't have access to MS Access, SQL Server or any other RDBMS.

2006-10-31 22:22:34 · answer #1 · answered by jools 3 · 0 0

Well, first I would recommend that you get a book on Visual Basic for use with databases. Most Visual Basic books don't show you how to write coding and set up stuff for work with databases, but there are a few Visual Basic books written explicitly for work with databases. You'll need the database to store your data on. Also, you will probably need Microsoft Access to help you set up the initial database and set up the relationships between the tables. For a database you don't put all of the information in one table. You'll want to put say the room check in availability, prices, amenities, etc in one table and the room cleaning schedule, room service, etc in another table. Then link them together via the room number or some ID number.

There's no way I could explain in full detail how to do an entire VB application on here. Just get a VB book that says on the cover, that it's specifically for use with databases. That will help you a bunch. Also, look up "bookmark" in the back of the VB book. You'll probably need to use it a number of times. Thought I'd mention that in case you didn't know about using bookmarks in VB with databases. They come in handy and it stumped me for several days trying to figure out how to do several thing I wanted because I taught myself. Then I stumbled across the bookmark and it helped a bunch.

Also, you will want to learn how to create queries in MS Access. A query basically just looks up data in the database and puts it into a new table to reference from. Yould also want to learn a little bit about SQL statements, DISTINCT and ORDER BY come in handy. You'll also need to put brackets [ ] before and after table or field names if you have a space in the name.

You'll also want to learn a descent bit about how the different controls work. For the date you could use a textbox, DTPicker, or MonthView. For some of the other stuff, you'll want to look at combo boxes, list boxes, option buttons, and check boxes. For list boxes and combo boxes its good to know the different ways to populate the lists. For combo boxes and working with databases, make sure the column count is set to one or however many columns you want it set to and the column widths adjusted accordingly. Often, it will automatically set the ColumnCount to 2 when you want it at 1 and the ColumnWidths will also be set up for two, especially if you use a wizard to help you create the combo box for a database. You'll try running the combo box then wonder why it won't run. Change those two properties and it will most likely work.

2006-11-01 06:36:46 · answer #2 · answered by devilishblueyes 7 · 0 0

fedest.com, questions and answers