missinglinq
AWF VIP
- Local time
- Today, 00:53
- Joined
- Jun 20, 2003
- Messages
- 6,417
The last time I did that my Snaggle-toothed, Bow-legged, Bully Bitch jumped up in my lap, to get to the beef, knocked the plate over, and got gravy all over the keyboard! 
Dim db as Dao.database, rst as Dao.recordset
Set db = currentdb()
Dim GetTableNames As String(), strTableNames() As String, lngLoop As Long
ReDim strTableNames(db.TableDefs.Count - 1)
For lngLoop = 0 To db.TableDefs.Count - 1
strTableNames(lngLoop) = db.TableDefs(lngLoop).Name
Next lngLoop
GetTableNames = strTableNames
Dim fld As Field
Set Rst = db.OpenRecordset(GetTableNames)
For Each fld In Rst.Fields
rst.fields(fld.name).Properties("DisplayControl") = 109
Next
Rst.Close
I didn't want to go into too much details here, only to point out that the two should not be confused.Welcom Keels
Refresh will refresh the records = save any unsaved data.
Requery will requery the object you want.
Though they sound as doing similar things they don't.
The last time I did that my Snaggle-toothed, Bow-legged, Bully Bitch jumped up in my lap, to get to the beef, knocked the plate over, and got gravy all over the keyboard!![]()
Luckily I don't have a Snaggle-toothed, Bow-legged, Bully Bitch so my gravy was safe and well usedThe last time I did that my Snaggle-toothed, Bow-legged, Bully Bitch jumped up in my lap, to get to the beef, knocked the plate over, and got gravy all over the keyboard!![]()
Now, can you explain why you are only using the FIRST name of people? How do you know which person is which? Or does it matter. Is the name just for being able to address someone when picking them up?
Keels:
The first thing you need to do is to GET RID OF THE LOOKUPS at TABLE LEVEL. You currently have several like this:
![]()
READ THIS to see more about why you don't want to use lookups at table level:
http://www.mvps.org/access/lookupfields.htm
Second, do NOT use * in field names. Do NOT, DO NOT, DO NOT! (did I make my point?) You should avoid special characters in field names but using the asterisk in a field name can totally cause way more hassle than its worth since the asterisk has special meaning in Access as a WILDCARD character.
(I will post more in a bit)
The table is gonna be a very big table.
No, we may get more than 1 Bob say, so if this particular Bob has called before then if I can list all people Named Bob it would be easier than trawling through heaps of names. You can usually Identify a passenger by their pick up address or destination so If 10 Bob's called am sure they would all be calling from a different pick up address or going to a different destination. And as long as the name, pick up add, and dest are all visible it would make life easier.
I think we should re-examine the table structure and what data you are storing. The current structure you have is not optimal for what you are intending to have there. I sent a PM to Access MVP Paul Baldarelli (pbaldy) to hopefully come here and help you with your structure since I believe he's done up something like this before.
Now I didn't know that is Paul's full nameAccess MVP Paul Baldarelli (pbaldy)
No, you misunderstood me. You do not have the combo boxes defined at table level. You still have the lookup tables which have the values but you use the combo's on the FORM, not in the table.
Ok Bob I have made a second order table (booking table 2) and have the info defined as text boxes but I notice I can not see the passenger names on the table as these are all ID numbers and without a look up at table level I don't get what I need. Is there a way of showing the actual name of the passenger as oppose to the passenger ID without using a look up? The form part is fine but if I want to print a report of the bookings table I need to see Names addresses and such like not ID numbers which mean nothing on a report.![]()
Okay, let's start from scratch. The way this should go is (simplified version since I don't have the ability to get into your database at work as I only have 2003 here).
tblPassengers
PassengerID - Autonumber (PK)
FirstName - Text
LastName - Text
This needs some other field to identify the correct
Person if duplicate names could exist. I usually use their own address.
tblBookings
BookingID - Autonumber (PK)
PassengerID - Long Integer (FK)
DestinationID - Long Integer (FK)
DateBooked - Date/Time
DateOfPickup - Date/Time
not sure about the other fields at the moment.
So for the bookings table I store the passenger ID but I use a COMBO BOX on the form to pull all of the passengers listed in the passengers table and have their names but store the ID.