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

SendKeys: second form to filter main form, Access 2003

14
Hi All,

I am stuck on a problem and hope someone can help me out. I have 8 users who will be using a form [Frm_main]. For the users to access their accounts I use the SendKeys function, the user click on their name to access their records. Each user has over 300 accounts and it is a growing list.

On my main form [Frm_main] whose record source is a query based on [Tbl_detail], I have a button on the main form which open a pop up form [Frm_review], the source for this form is a query based on [Tbl_detail]. The pop up form only display records that needs to be reviewed for today. On the pop up form [Frm_review] I have a button [Filter] when a user clicks on those records are filtered on the main form. The problem I have is when the user click on it a screen pop’s up asking to enter user. When I enter the user the records are filtered on the main form. Is there a way I can program the button so that it does not ask for a user. The code below is for the [Filter] button.


Private Sub Filter_Click()
Dim code As String

code = "[ReviewDate]= Date()"

DoCmd.OpenForm "Frm_main", acNormal, , code

DoCmd.Close acForm, Me.Name

End Sub


Everything I’ve read on the internet pretty much say I should stay away from using SendKeys. Any advice or suggestion I would greatly appreciate, thank you!
Dec 17 '07 #1
1 2190
Bface
14
Hi All,

I am not sure if anyone was looking into this but I wanted to let everyone know that I decided to change my approach. Dealing with sendkeys is to much problem. I decided to change the RecordSource for each user and it is working great. Here is the code I use in case someone else has the same problem, it is simple.

Private Sub LogginT_Click()
Dim SQL As String

SQL = "SELECT * FROM Tbl_detail WHERE ((Tbl_detail.User)='Tom');"

DoCmd.OpenForm "Frm_main", acNormal

Forms! Frm_main.RecordSource = SQL
End Sub
Dec 21 '07 #2

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

Similar topics

1
by: Robert Neville | last post by:
I would like to add filter functionality to my database whether through the Main form or the subform. This question may be rudimentary, yet I have not less experience with filtering data outside...
2
by: Andante.in.Blue | last post by:
Hi everyone! I was wondering if there is a away to use Access 97's build in filter-by-form function but restrict its effect to just the subform. I have a parent form that shows the major...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
3
by: dhowell | last post by:
In reading some of the posts on this group, it appears as though it is not strait forward at all to filter a form, which has subforms, by criteria which are either on subforms or span more than one...
2
by: David Kanter | last post by:
Hi, I am relatively inexperienced with VB.Net, but I am familiar with many concepts from programming; I have some basic level of competence with C/C++ and Perl, but I just started using VB this...
0
by: theBman | last post by:
I have 2 tables. One master, one child using Access 2003 (PC) Have 2 forms. The main form is continuous while the sub is datasheet. I can filter on the main form and the subform filters with...
0
by: neonspark | last post by:
I'm buidling some simple macro functionality for my app so the users can record a sequence of keyboard inputs and replay them reliably via some menu. Originally, I used: protected override bool...
2
by: franc sutherland | last post by:
Hello, I am using Access 2003. I have a query which shows a list of club meetings sorted by date. This query is displayed in continuous forms, in a subform. I would like to select a month on...
6
by: Whizzo | last post by:
Hi folks; I spent a little while some time ago building a touchscreen data entry interface into an Access 2003 form. I'm not too experienced in VBA at all so I was quite happy when I came up with a...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
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
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,...
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...
0
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...

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.