I'm modifying an Access 2000 database created by a co-worker who is no longer with the organization, and is trying to figure out one part of the program. The database has two tables, tblemployees and tblCorrectiveAc tion. The tblemployees has fields ENAME, UserID, and a few others. TblCorrectiveAc tion has an autonumber field named Corrective Action ID, Originator, OrigDept, DateofCA, and several other fields. Then there is a form that has text boxes bound to Corrective Action ID, Originator, OrigDept, and DateofCA. When the form opens, the program looks for the currentuser (logged-in to the computer) and matches the UserID to print the Originator. Then, it fills in the DateofCA and OrigDept. How does the program look at the autonumber field (Corrective Action ID) and fill in the highest number?
The person is using - Sub AssignName()
-
If Not IsNull(DLookup("[ENAME]", "tblEmployees", "[UserID] = ... etc as part of initial lookup.
-
Me!txtOriginator.Text = DLookup("[ENAME]", "tblEmployees", "[UserID] =
-
more lines ....
-
End If
-
End Sub
2 2380 NeoPa 32,578
Recognized Expert Moderator MVP
Anekwe, - Please remember to use code tags when posting a question (As per REPLY GUIDELINES at the right).
- Are you asking how generally to do it or are you asking someone to work out how your erstwhile colleague did it in his code?
NeoPa 32,578
Recognized Expert Moderator MVP
BTW - If it's the latter you're asking then all the (relevant) code would be needed. I had a look at what you posted and you've chopped out some of the important bits :(
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Frances |
last post by:
Hi All,
I'm having a problem trying to add a record to a simple Access 2000 db
(db is very similar to an address book but with more info than the
usual address, phone, etc.).
The database is one table, 36 fields. The record_id field is an
autonumber field (long int) and primary key. The rest of the fields
comprise of 30 text fields, 3 memo fields, 1 date field and 1 currency
field. Text fields vary in number of characters allowed. ...
|
by: Wayne Smith |
last post by:
I've come up against a major headache that I can't seem to find a solution
for but I'm sure there must be a workaround and I would really be grateful
of any help.
I'm currently building a web site for a small club I belong to and one of
the features I would like to include is the ability to allow users to upload
image files.
unfortunately the servers web root www folder only allows READ and EXECUTE
permissions, which makes it...
|
by: keri |
last post by:
Hello again,
While I try and solve the calender issue I also have another problem.
I have a form & table (appointments) where the user records
appointments in the future. The fields include date, time and duration.
I would like a pop up box to appear when registering an appointment if
the time / days clash with another appointment.
Somehow I need to create a table or query that blocks out sections of
|
by: jmar |
last post by:
I'm hoping someone out there can give me a little guidance. I have
an Access Database "Customer.MDB" with a table "CustInfo" that
has the following design:
Field: DataType
CustID AutoNumber
Name Text
Title Text
Phone Text
|
by: Don Do |
last post by:
Help
I built a form/subform/subsubform setup using the access forms
wizard. I have a table1 = parent, table2 = child, table3 =
(grandchild?). There will be multiple records in table2 that tie to
table1, and multiple records in table 3 that tie to table2. Both on
"1 to many" joins.
Each of the forms are bound to the fields in the respective tables.
The subform & subsubform are datasheet view. When I enter any data, I
| |
by: sjvandevoorde |
last post by:
II am hoping someone out there will be able to give me some guidance, as I am about to give up. I have been working on this for some time and I think I have looked at it so much that I can't even think straight.
I am working on a database to help track projects. There are three different types of projects/screens that I need. What I have so far:
TABLE: Taskers (Screen/form 1)
FIELDS:
RMTaskerID – Autonumber/Primary Key
CGTaskerNmbr -...
|
by: BMF |
last post by:
Howdy,
I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables.
Table ID ---
userID -- AutoNumber
UserInfo - userID (linked to ID.userID
fname -- text
lname -- text
age -- number
|
by: ashes |
last post by:
Hi,
I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net
When someone wants to register on the website, they fill out a form and the contents of the form is inserted into the MS Access database.
The Customer table in the database already has 30 records (with CustomerIDs 1 - 30) in it (from when the database was first created). The CustomerID field in the database is an...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |