473,414 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Find or look up record

I have a table with Coloms :

CardID : Timein : Bookstaken : Timeout : Booksback

When a person comes in his
card_id number is filled in to the field "cardid"
Time in = "now()"
Bookstaken is also filled in.
After update the form closes.
A couple of record can be made before the person leaves and give the books back.

I want to have a new form with a unbound text box which will search for the last record containing that specific Card Id number.
The rest of the record will then be filled in.
i.e.. Timeout = now()
I tried a number of "find" codes but none seems to work the way I want it to.
Mar 27 '07 #1
5 2482
Rabbit
12,516 Expert Mod 8TB
I have a table with Coloms :

CardID : Timein : Bookstaken : Timeout : Booksback

When a person comes in his
card_id number is filled in to the field "cardid"
Time in = "now()"
Bookstaken is also filled in.
After update the form closes.
A couple of record can be made before the person leaves and give the books back.

I want to have a new form with a unbound text box which will search for the last record containing that specific Card Id number.
The rest of the record will then be filled in.
i.e.. Timeout = now()
I tried a number of "find" codes but none seems to work the way I want it to.
An unbound text box can't really search for the last record containing a specific card id number. Unless you mean you want that unbound text box to concatenate every field in the record, which I doubt. So I'm thinking you want to return a specific field from the record.

Also, I assume the last record of a card id number will have the most recent Time In.

So, you'll want to use a DLookup to look up the field you want and a DMax as part of the criteria to get the last record.
Mar 27 '07 #2
An unbound text box can't really search for the last record containing a specific card id number. Unless you mean you want that unbound text box to concatenate every field in the record, which I doubt. So I'm thinking you want to return a specific field from the record.

Also, I assume the last record of a card id number will have the most recent Time In.

So, you'll want to use a DLookup to look up the field you want and a DMax as part of the criteria to get the last record.
If I lookup the record will I be able to edit the rest of the blank records?
and what will the code look like?
I will see if I can work it out myself as well.
Thanks for the Info!!!
Mar 28 '07 #3
Rabbit
12,516 Expert Mod 8TB
If I lookup the record will I be able to edit the rest of the blank records?
and what will the code look like?
I will see if I can work it out myself as well.
Thanks for the Info!!!
I'm not following.

Are you trying to go to a certain record?
Or
Are you trying to retrieve a specific value from a table?
Mar 28 '07 #4
I'm not following.

Are you trying to go to a certain record?
Or
Are you trying to retrieve a specific value from a table?

Hi
What I tried to do was going to a certain record and then enter the new data in to the exsisting record.
i.e. Books out - books back for the spesific id holder.After giving it some thought it might not be such a gr8 idea to edit a exsiting report.Rather make a new record with books back and then reconsile , the books out - books back with a query , sorted by date and card id.
Hope this make sence?! Some time it is easier to plan things in your mind than exsplaning the idea.
The code for finding a record will still be quite usefull in a other aplication though.
Thank you for all your help and time!! Hope I can one day be as help full to others!
Mar 28 '07 #5
Rabbit
12,516 Expert Mod 8TB
DoCmd.FindRecord will take you to the first occurence of a criteria that you supply. More can be found in the visual basic editor help files.
Mar 28 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: JIMMIE WHITAKER | last post by:
Can someone help on this: I am just learning, and I'm connecting to the the northwindcs.mdf tables / open file is northwindcs.adp. This is the sample installed using msde, which is supposed to be...
10
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
2
by: kufre | last post by:
I just want to say thank you to everyone that has help me with my database. Could someone please take a look at this code and tell me what it is I'm doing wrong. I have a find command button on...
3
by: Randy | last post by:
I have been able to set up a Find Record Button on my switchboard to take me to a form with the correct case number by using a parameter query and macro. When I try to run the Find Record button...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
18
by: strchild | last post by:
Hey Guys, I've been perusing the newsgroup here for some time now, and going through my ever so non-helpful book, Microsoft Visual Basic .NET Step by Step Version 2003, over and over, and I feel...
0
by: AA Arens | last post by:
I made a find record button on my form "company" (with field for name, phone nr, e-mail etc.). I expect that when I focus on one of the field, the "look in" of the find-record dialog box should...
1
by: AA Arens | last post by:
I use the undermentioned code to find a record in a predefined "Look In" field: Private Sub Command137_Click() On Error GoTo Err_Find_Record_Click Me.CompanyName.SetFocus DoCmd.DoMenuItem...
1
by: cwby1966 | last post by:
I have a parent form that that has a combo field that i want to have it look up and find a record in the sub form. Private Sub List20_AfterUpdate() ' Find the record that matches the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.