DLookup Question, specifically about criteria

C

Cameron P

Crystal,

I did everything in your instructions, and I am pretty sure it worked. Here
are the results from the Debug Window:

7 CheckAmount, 5 (Currency), 8
8 CardType, 10 (Text), 50
9 CardNumber, 10 (Text), 50
10 Expiration, 10 (Text), 50
11 Name, 10 (Text), 50
12 ID, 4 (Long), 4
13 Room1, 10 (Text), 50
14 Type1, 10 (Text), 50
15 Smoking1, 1 (Boolean), 1
16 Arrival1, 8 (Date), 8
17 Departure1, 8 (Date), 8
18 LateArrival1, 1 (Boolean), 1
19 SpecialNeeds1, 10 (Text), 50
20 Room2, 10 (Text), 50
21 Type2, 10 (Text), 50
22 Smoking2, 1 (Boolean), 1
23 Arrival2, 8 (Date), 8
24 Departure2, 8 (Date), 8
25 LateArrival2, 1 (Boolean), 1
26 SpecialNeeds2, 12 (Memo), 0
27 Room3, 10 (Text), 50
28 Type3, 10 (Text), 50
29 Smoking3, 1 (Boolean), 1
30 Arrival3, 8 (Date), 8
31 Departure3, 8 (Date), 8
32 LateArrival3, 1 (Boolean), 1
33 SpecialNeeds3, 12 (Memo), 0
34 DepositID, 10 (Text), 50
35 Confirmation, 10 (Text), 50
36 EntryDate, 8 (Date), 8

Show Room Type
==========================
1 ID, 10 (Text), 50
2 RoomType, 10 (Text), 50

Show Seminars
==========================
1 SAEvent, 4 (Long), 4
2 SAID, 4 (Long), 4
3 SANoAttending, 4 (Long), 4
4 SAFeesSubTotal, 5 (Currency), 8
5 SARecNo, 4 (Long), 4

Show Seminars Import
==========================
0 SAEvent, 4 (Long), 4
1 SAID, 4 (Long), 4
2 SANoAttending, 4 (Long), 4
3 SAFeesSubTotal, 5 (Currency), 8
4 SARecNo, 4 (Long), 4

Show Seminars OLD
==========================
0 SAEvent, 4 (Long), 4
1 SAID, 4 (Long), 4
2 SANoAttending, 4 (Long), 4
3 SAFeesSubTotal, 5 (Currency), 8
4 SARecNo, 4 (Long), 4

Show Stores
==========================
0 Count, 4 (Long), 4
1 Store, 10 (Text), 50
2 Fax, 10 (Text), 50
3 Date, 8 (Date), 8
4 NewMember, 1 (Boolean), 1
5 MemberSince, 10 (Text), 4

Show Stores Import
==========================
0 Count, 4 (Long), 4
1 Store, 10 (Text), 50
2 Fax, 10 (Text), 50
3 Date, 8 (Date), 8
4 NewMember, 1 (Boolean), 1
5 MemberSince, 10 (Text), 4

ShowAttendees121304_ImportErrors
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

ShowAttendees121404_ImportErrors
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

ShowAttendees121404_ImportErrors1
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

ShowAttendees51305
==========================
0 ID, 4 (Long), 4
1 Field1, 4 (Long), 4
2 Field2, 4 (Long), 4
3 Field3, 10 (Text), 255
4 Field4, 4 (Long), 4
5 Field5, 4 (Long), 4
6 Field6, 10 (Text), 255

ShowAttendees51305_ImportErrors
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

Showevents51305
==========================
0 ID, 4 (Long), 4
1 Field1, 4 (Long), 4
2 Field2, 4 (Long), 4
3 Field3, 4 (Long), 4
4 Field4, 4 (Long), 4
5 Field5, 4 (Long), 4
6 Field6, 4 (Long), 4
7 Field7, 10 (Text), 255
8 Field8, 4 (Long), 4
9 Field9, 10 (Text), 255
10 Field10, 4 (Long), 4
11 Field11, 8 (Date), 8
12 Field12, 10 (Text), 255
13 Field13, 4 (Long), 4
14 Field14, 10 (Text), 255
15 Field15, 10 (Text), 255
16 Field16, 10 (Text), 255
17 Field17, 8 (Date), 8
18 Field18, 8 (Date), 8
19 Field19, 10 (Text), 255
20 Field20, 10 (Text), 255
21 Field21, 10 (Text), 255
22 Field22, 10 (Text), 255
23 Field23, 10 (Text), 255
24 Field24, 10 (Text), 255
25 Field25, 10 (Text), 255
26 Field26, 10 (Text), 255
27 Field27, 10 (Text), 255
28 Field28, 10 (Text), 255
29 Field29, 10 (Text), 255
30 Field30, 10 (Text), 255
31 Field31, 10 (Text), 255
32 Field32, 10 (Text), 255
33 Field33, 10 (Text), 255
34 Field34, 10 (Text), 255
35 Field35, 10 (Text), 255
36 Field36, 10 (Text), 255
37 Field37, 8 (Date), 8

showevents51305_ImportErrors
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

ShowSeminars51305
==========================
0 ID, 4 (Long), 4
1 Field1, 4 (Long), 4
2 Field2, 4 (Long), 4
3 Field3, 4 (Long), 4
4 Field4, 4 (Long), 4
5 Field5, 4 (Long), 4

ShowSessions
==========================
1 SessionID, 4 (Long), 4
2 SessionDesc, 10 (Text), 50
3 SessionTime, 8 (Date), 8
4 EndTime, 8 (Date), 8

ShowStores51305
==========================
0 ID, 4 (Long), 4
1 Field1, 4 (Long), 4
2 Field2, 4 (Long), 4
3 Field3, 10 (Text), 255
4 Field4, 8 (Date), 8
5 Field5, 10 (Text), 255

ShowStores51305_ImportErrors
==========================
0 Error, 10 (Text), 255
0 Field, 10 (Text), 255
0 Row, 4 (Long), 4

TempEventFees
==========================
1 SAEvent, 4 (Long), 4
2 EventFees, 5 (Currency), 8

TempSeminarFees
==========================
1 Store, 10 (Text), 50
2 SeminarFees, 5 (Currency), 8

Thanks a ton for all this help!

-Cameron

p.s. I noticed when looking through the database awhile ago, and again when
looking at these results, that some of the field names and table names aren't
what they should be. For instance there are field names in table titled:
Field1, Field2, etc. And some tables, as you have pointed out have spaces in
the names. I am curious if I could rename these and remove spaces and such
without ruining any of the forms or reports that are already prepared.
Remember that our organization had another person do this DB for them, so I
had not seen it until asked to help in this matter of combining forms. But,
would renaming things ruin the already prepared forms and reports? Thanks!
 
C

Cameron P

Sorry, another thing. When I did what you told me to do earlier, I made sure
to reference the library, copied and pasted your code into the module, then
pressed F5, then copied the results from the debug menu into a reply to you.
But, after that I attempted to compile, under the Debug Menu at the top, and
it gave me this error:

Compile Error:
Sub or function not defined.

and it highlights this:

Private Subform_Close ()
Call ResetAllStores <-----highlights this part
End Sub

any idea what to do? thanks.
 
C

Cameron P

ANOTHER thing, sorry again!

But I noticed in the results from the debug that I pasted, it starts at 7
CheckAmount, and doesn't show anything above that...it won't scroll up any
higher for me to copy and paste...no idea there either
 
S

strive4peace

field Caption property, AutoCorrect
---


Hi Cameron

"some of the field names and table names aren't what they should be.
For instance there are field names in table titled: Field1, Field2, etc."

Like the ShowAttendees51305 and Showevents51305 tables?

I suspect this is because you imported the data and then put CAPTIONS on
the fields instead of changing the fieldname

You should NOT use the caption property in the table design for your
fieldnames -- doing so masks the real name when you open the table.
Users should not open tables, only programmers and administrators -- and
those people need to see the real fieldnames

"I am curious if I could rename these and remove spaces and such without
ruining any of the forms or reports that are already prepared."

the AutoCorrect feature will pick up some changes but not all -- you
will have to manually correct things. You should disable the
AutoCorrect feature anyway

Failures caused by Name AutoCorrect
http://allenbrowne.com/bug-03.html


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

Comment Line with Error
---


Hi Cameron,

this is not a line in the code that I gave you, it must be something
else in your database. You can just comment the line that causes the
problem (since it doesn't work anyway) by putting a single quote ' in front

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

Hi Cameron,

you have a lot of tables that are not needed for your database -- such
as PasteErrors tables and "old" tables ... delete them. The Debug
window has a limited number of lines it can store.

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
C

Cameron P

Here is an updated Debug window:


~TMPCLP3921
==========================
0 Event, 4 (Long), 4
1 Store, 10 (Text), 50
2 NewMemberLunch, 4 (Long), 4
3 WedReception, 4 (Long), 4
4 FinancialManage, 4 (Long), 4
5 FinancialManageFee, 5 (Currency), 8
6 ThursReception, 4 (Long), 4
7 TaxSecrets, 4 (Long), 4
8 TaxSecretsFee, 5 (Currency), 8
9 StoreDesign, 4 (Long), 4
10 StoreDesignFee, 5 (Currency), 8
11 MasterEssentials, 4 (Long), 4
12 MasterEssentialsFee, 5 (Currency), 8
13 FriReception, 4 (Long), 4
14 FriOneonOne, 4 (Long), 4
15 FriOneonOneFee, 5 (Currency), 8
16 Winery, 4 (Long), 4
17 WineryFee, 5 (Currency), 8
18 SatBreakfast, 4 (Long), 4
19 SatRoundTable, 4 (Long), 4
20 DudeRanch, 4 (Long), 4
21 DudeRanchFee, 5 (Currency), 8
22 Stampede, 4 (Long), 4
23 StampedeFee, 5 (Currency), 8
24 TotalEventFee, 5 (Currency), 8
25 SeminarFees, 5 (Currency), 8
26 EventFees, 5 (Currency), 8
27 TotalShowFees, 5 (Currency), 8
28 CheckNumber, 10 (Text), 50
29 CheckAmount, 5 (Currency), 8
30 CardType, 10 (Text), 50
31 CardNumber, 10 (Text), 50
32 Expiration, 10 (Text), 50
33 Name, 10 (Text), 50
34 ID, 4 (Long), 4
35 Arrival, 8 (Date), 8
36 Departure, 8 (Date), 8
37 LateArrival, 1 (Boolean), 1
38 Room1, 10 (Text), 50
39 Type1, 10 (Text), 50
40 Smoking, 1 (Boolean), 1
41 Room2, 10 (Text), 50
42 Type2, 10 (Text), 50
43 Smoking2, 1 (Boolean), 1
44 Room3, 10 (Text), 50
45 Type3, 10 (Text), 50
46 Smoking3, 1 (Boolean), 1
47 SpecialNeeds, 12 (Memo), 0
48 DepositID, 10 (Text), 50
49 Confirmation, 10 (Text), 50
50 EntryDate, 8 (Date), 8

All Stores
==========================
0 ID, 4 (Long), 4
1 STORE, 10 (Text), 50
2 ADDRESS, 10 (Text), 50
3 ADDRESS2, 10 (Text), 50
4 CITY, 10 (Text), 25
5 ST, 10 (Text), 2
6 ZIP, 10 (Text), 15
7 PHONE, 10 (Text), 50
8 FAX, 10 (Text), 50
9 CONTACT, 10 (Text), 50
10 EMAIL, 10 (Text), 50

Credit Cards
==========================
2 ID, 10 (Text), 50
3 CardType, 10 (Text), 50

Hotel Choices
==========================
0 ID, 4 (Long), 4
1 HotelID, 4 (Long), 4
2 HotelName, 10 (Text), 50

Seminars
==========================
0 SMID, 4 (Long), 4
1 SMDesc, 10 (Text), 100
2 SMStrDate, 8 (Date), 8
3 SMEndDate, 8 (Date), 8
4 SMStrTime, 8 (Date), 8
5 SMEndTim, 8 (Date), 8
6 SMFee, 5 (Currency), 8
7 SMTickets, 1 (Boolean), 1
8 SortOrder, 4 (Long), 4

Show Attendees
==========================
0 Attendee, 4 (Long), 4
1 Store, 10 (Text), 50
2 Name, 10 (Text), 50
3 Fee, 5 (Currency), 8
4 SessionID, 4 (Long), 4
5 AttendSeminar, 1 (Boolean), 1

Show Deposit
==========================
1 DepositID, 10 (Text), 50
2 Type, 10 (Text), 50

Show Events
==========================
0 Event, 4 (Long), 4
1 Store, 10 (Text), 50
2 TotalEventFee, 5 (Currency), 8
3 SeminarFees, 5 (Currency), 8
4 EventFees, 5 (Currency), 8
5 TotalShowFees, 5 (Currency), 8
6 CheckNumber, 10 (Text), 50
7 CheckAmount, 5 (Currency), 8
8 CardType, 10 (Text), 50
9 CardNumber, 10 (Text), 50
10 Expiration, 10 (Text), 50
11 Name, 10 (Text), 50
12 ID, 4 (Long), 4
13 Room1, 10 (Text), 50
14 Type1, 10 (Text), 50
15 Smoking1, 1 (Boolean), 1
16 Arrival1, 8 (Date), 8
17 Departure1, 8 (Date), 8
18 LateArrival1, 1 (Boolean), 1
19 SpecialNeeds1, 10 (Text), 50
20 Room2, 10 (Text), 50
21 Type2, 10 (Text), 50
22 Smoking2, 1 (Boolean), 1
23 Arrival2, 8 (Date), 8
24 Departure2, 8 (Date), 8
25 LateArrival2, 1 (Boolean), 1
26 SpecialNeeds2, 12 (Memo), 0
27 Room3, 10 (Text), 50
28 Type3, 10 (Text), 50
29 Smoking3, 1 (Boolean), 1
30 Arrival3, 8 (Date), 8
31 Departure3, 8 (Date), 8
32 LateArrival3, 1 (Boolean), 1
33 SpecialNeeds3, 12 (Memo), 0
34 DepositID, 10 (Text), 50
35 Confirmation, 10 (Text), 50
36 EntryDate, 8 (Date), 8

Show Room Type
==========================
1 ID, 10 (Text), 50
2 RoomType, 10 (Text), 50

Show Seminars
==========================
1 SAEvent, 4 (Long), 4
2 SAID, 4 (Long), 4
3 SANoAttending, 4 (Long), 4
4 SAFeesSubTotal, 5 (Currency), 8
5 SARecNo, 4 (Long), 4

Show Stores
==========================
0 Count, 4 (Long), 4
1 Store, 10 (Text), 50
2 Fax, 10 (Text), 50
3 Date, 8 (Date), 8
4 NewMember, 1 (Boolean), 1
5 MemberSince, 10 (Text), 4

ShowSessions
==========================
1 SessionID, 4 (Long), 4
2 SessionDesc, 10 (Text), 50
3 SessionTime, 8 (Date), 8
4 EndTime, 8 (Date), 8

TempEventFees
==========================
1 SAEvent, 4 (Long), 4
2 EventFees, 5 (Currency), 8

TempSeminarFees
==========================
1 Store, 10 (Text), 50
2 SeminarFees, 5 (Currency), 8


This is everything, minus the few tables that I deleted. Remember that I
did not build this database, and do not use it myself, I am not positive what
is needed. I hope that in deleting the previous tables (such as:
ShowAttendees51305, and the Temp tables, and the Backup table to Show Events)
that I did not ruin anything. As you can see from the previous post that had
the debug window info, that there was plenty that I deleted. FYI, I am
working in a copy of the original, so if something goes wrong, not all is
lost.

Ha, they thought this would be a quick fix of just combining forms...=\

So, now that you have the table info...what's next to help combine the two
forms?

Thanks for your help!
 
C

Cameron P

As well, I deleted the Import tables...not sure how that affects things
either...anyways, let me know if all of this helps you help me combine those
forms. Thanks.

-Cameron
 
S

strive4peace

Hi Cameron,

I've been away for awhile, sorry ... do you still need help?


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top