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

Help needed: two ways of keeping en using default user preferences

Hello experts,

I am a VBA newbie. Most of the tricks I apply to my applications I learn
from here or google. I couldn't find a solution for the following two
things, they both are related to using default user preferences. I hope
someone can help me with samples.

Question 1: Keeping filter settings

I have a form with some unbound comboboxes to do some filtering on the
form. For example:

Rowsource of one of the unbound combobox:
SELECT [tblObject].[Object_ID], [tblObject].[Objectname] FROM
[tblObject] UNION (SELECT -1,"All" FROM tblObject);

Further I use the following logic:

---
Private Sub cboObjectLU_AfterUpdate()
FilterForm
End Sub
---
Private Sub cboObjectLU_Click()
FilterForm
End Sub
---
Private Sub FilterForm()
Dim strFilter As String

strFilter = ""

If Not Me.cboPersonLU = -1 Then
strFilter = "Person_ID = " & Me.cboPersonLU
End If

If Me.cboObjectLU <> -1 Then
If strFilter <> "" Then
strFilter = strFilter & " AND Object_ID = " & Me.cboObjectLU
Else
strFilter = "Object_ID = " & Me.cboObjectLU
End If
End If

Me.Filter = strFilter
Me.FilterOn = True
Me.Requery

End Sub
---

This works great. But what I would like is that the last used filter is
stored in a table and when the form is opened again the last used filter
is applied by default. How should I do that?
Question 2: Use some application defaults

This question is a lot like the first question 1, but what I would like
is to have a form in the application where the user can set some default
values. These values are stored in a table. For example, in this form the
user sets his Person_ID. In other forms this value should be used to set
the default value of a filter, for example as above the unbound combobox
cboPersonLU filter.
Again, I am still a newbie and tried to find tips in this group and
google. I appreciate all help!

Regards,

Suzanne


Nov 12 '05 #1
0 1702

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
18
by: | last post by:
Please help. After a number of wrong turns and experiments I need advice on login management system to secure our web pages without inconveniencing our visitors or our internal staff. What I...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
1
by: Hemanth | last post by:
Hello there, A newbie question....any help is appreciated. I'm trying to create a script that searches a few database tables based on the search text and user search preferences. I created a...
5
by: Steve Patrick | last post by:
Hi All You guys are my last hope, despite spending money on books and hours reading them I still can not achieve the results I need. I have designed a database in Access 2000 based on 1 table,...
3
by: WJA | last post by:
I have a database that has a "settings" form that is always open and hidden unless an "Admin" user chooses to view it. The form is bound to a "settings" table that has one record and several fields...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
0
by: Chuck36963 | last post by:
Hi all, I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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...

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.