473,395 Members | 1,532 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,395 software developers and data experts.

Filter info by who logs in.

56
I have a database and I am using a function that captures the shortname and displays it on the mainMenu screen.

What I want to do is filter the information on the "past due" screen based on the person who has just open the database so that they can see just their items.

The shortname is stored in a table called "TShortNames" The shortname ties to an 4 character "Opid". This same "opid' is in the main "TARA" table that stores all the infomation.

What I would like to happen is from the main screen when they click on "PastDue" it will on a Mainform\Subform.
The user would click on "Option1" and a the opid control in the main form will appear and show that users opid and already have the subform filtered to just show their items. Then they could continue to filter by additonal combo boxes.

Right now they have to select there opid and then keep selecting from additional combo boxes. Example if I open the datebase clicked on past due and clicked the first option. The subform will become visible and the combo box would show "HH01" and it would show that I had 5 items that I need to work.

Attached is a demo to show what I currently have and to see if what I am asking is possible.
Jan 10 '07 #1
5 1508
Why just make a subform form TARA then use Opin as Mother and Child link ID?

HTH,
George

I have a database and I am using a function that captures the shortname and displays it on the mainMenu screen.

What I want to do is filter the information on the "past due" screen based on the person who has just open the database so that they can see just their items.

The shortname is stored in a table called "TShortNames" The shortname ties to an 4 character "Opid". This same "opid' is in the main "TARA" table that stores all the infomation.

What I would like to happen is from the main screen when they click on "PastDue" it will on a Mainform\Subform.
The user would click on "Option1" and a the opid control in the main form will appear and show that users opid and already have the subform filtered to just show their items. Then they could continue to filter by additonal combo boxes.

Right now they have to select there opid and then keep selecting from additional combo boxes. Example if I open the datebase clicked on past due and clicked the first option. The subform will become visible and the combo box would show "HH01" and it would show that I had 5 items that I need to work.

Attached is a demo to show what I currently have and to see if what I am asking is possible.
Jan 11 '07 #2
favor08
56
Why just make a subform form TARA then use Opin as Mother and Child link ID?

HTH,
George
It's a little more complicated than that. because I still want them to be able to select another person's opid if that person is not in and they need to do their work.

Is there a way to tie a sql statement and Dlookup together?

strSQL = "TARA.NetC=0 "
Me.CboOpid = DLookup("[Opid]", "TShortNames", "[ShortName] = FOSUserName()")

Can the two statements above be combined?
Jan 11 '07 #3
favor08
56
I have a Mainform called "MainPastDue" and a Subform called "PastDues". Currently when the user logs in they open the Mainform and click on an Option button and a combo box appears where they can select their name and it will filter the data in the subform based on there name.

I wanted to automate this process.

I created a table that stores their "ComputerName" and the uers name. What I would like to happen is to take the computer name look up the user's name that maps to the computer name and when they click on option one filter the data automatically to show only their items instead of them having to select their name.

Here is the code on the Afterupdate of Option 1:

Expand|Select|Wrap|Line Numbers
  1. Dim linker
  2. Dim strSQL As String
  3. linker = Frame95.Value
  4. Select Case linker
  5.         Case 0
  6.         ittype = 0
  7.         Me.Cmdclose.SetFocus
  8.         Me.FPastDues.Form.FilterOn = False
  9.         strSQL = "TARA.NetC=0"
  10.         FPastDues.Visible = True
  11.         Me.FPastDues.Form.Filter = strSQL
  12.         Me.FPastDues.Form.FilterOn = True
What I am trying to add is this:
Expand|Select|Wrap|Line Numbers
  1. Me.CboName = DLookup("[EmployeeName]", "TShortNames", "[ShortName] = FOSUserName()")
Me.CboName - is the combo box where they currently select their name.
TshortNames -is the table that stores the computer name and their name
FOSUserName- is the function I am using to capture the computer name

The Mainform and Subform record source is using another table that has the empolyee's name and I need to somehow say after it finds the Employee name match it to name int he main table and refilter the info.
Jan 11 '07 #4
NeoPa
32,556 Expert Mod 16PB
You're not making much sense here.
Is "TARA.NetC=0" part of the Filtering?
Are you looking for something like :
Expand|Select|Wrap|Line Numbers
  1. Me!OpID=DLookup("[OpID]","TShortNames","(([ShortName]=' & FOSUserName() & "') AND (TARA.NetC=0))")
Jan 12 '07 #5
NeoPa
32,556 Expert Mod 16PB
As it seems you've asked this question before I'm going to join the two threads.
No-one wants to answer the same question twice.
Let us know if your question is not adequately answered.
Jan 12 '07 #6

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

Similar topics

7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
2
by: cefrancke | last post by:
I have a form (no underlying record set) that has two separate sub-forms on it. Each sub-form has data from two different tables. Above each sub-form there is one unbound combo box with a SQL...
5
by: tjonsek | last post by:
I am trying to pull the user logon info in an asp.net application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however,...
1
by: Rene Pijlman | last post by:
I'd expect the program below to put only one line with "Eat me" in the log file. However, I get this with Python 2.4.2 in WingIDE on Windows XP: Eat me Ignore me My understanding is: 1....
5
by: The Cool Geek | last post by:
I'm building a dynamic site that has 3 data bases. One DB contains all of my store info ID#, Name, Address, Phone. Another DB contains member info ID, Name, address, email,phone,etc... The 3rd DB...
0
by: mpdoreilly | last post by:
Hi, I've a webservice that has several typical webmethods that clients call and get responses from. (Side note: The websriivce is actually to implement the server side of tr-069, the protocol...
5
by: Hutch | last post by:
Ok so i have a form that is in Continuous view displaying many "Call Logs" A drop down box is located in the header of the form. This box isalready set up to look at the Companys that are designated...
1
by: Binba | last post by:
I'm trying to apply transparency to some elements in my scrollbars, and according to what they say on this World Wide Web thingy, CSS filter:chroma is the way to do it. Problem is, whenever I add...
4
by: Twayne | last post by:
Hi, I've been playing with ' if(!filter_var($email, FILTER_VALIDATE_EMAIL)) ' on my server and it seems to be working 100%. Pretty handy. Any ideas where I could find a summary of the e-mail...
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
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...
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
jinu1996
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.