473,398 Members | 2,188 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,398 software developers and data experts.

Form Opening Help!!!

Presto731
I have a paremeter query set up that asks you to enter a value to open it. I want the form attached to that query to ask for the same info when you open it. It does that when you click on the form from the database window. All well and good!

However my problem lies when I try to open the form from a switchboard, it just simply opens the form instead of first asking for the value

I'm sure its a simple answer I'm overlooking. I would certainly appreciate anyone's input and help. Thanks.
Jul 17 '07 #1
4 1210
damonreid
114 Expert 100+
When you are building the button in the form (or switchboard) you need to set open criteria on the open command. Personally I prefer using a combo box to get them to select a value prior to opening the form.

Expand|Select|Wrap|Line Numbers
  1.     Dim stDocName As String
  2.     Dim stLinkCriteria As String
  3.  
  4.     stDocName = "NAME OF YOUR FORM"
  5.  
  6.     stLinkCriteria = "[NAME ON NEW FORM YOU WANT TO FILTER]=" & "'" & Me![COMBO BOX VALUE] & "'"
  7.     DoCmd.Close
  8.     DoCmd.OpenForm stDocName, , , stLinkCriteria
Jul 17 '07 #2
I appreciate the reply. A combo box won't actually work because the number of records is enormous!

My VB skills are lackluster at best. DOn't suppose you have an easier way! :)

Thank you though!
Jul 17 '07 #3
damonreid
114 Expert 100+
You can have a blank box and let them type in a value before opening or alternatively on all combo boxes they an start typing in the value and it will autocomplete.

Either way they still have to enter the value, with a combo box it is just a little easier.
Jul 17 '07 #4
You can have a blank box and let them type in a value before opening or alternatively on all combo boxes they an start typing in the value and it will autocomplete.

Either way they still have to enter the value, with a combo box it is just a little easier.

Sorry. Brain Fart, You're correct. Problem solved. Thanks!
Jul 17 '07 #5

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

Similar topics

0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
4
by: Larry | last post by:
Hi All, How I can open a new web page in a web form? I know response.redirect("...aspx") will re-direct the current page to another. However, what I want is to remain the current page unchange...
1
by: kevcar40 | last post by:
hi is it possible to stop a form opening if the result of the query is null? eg select a company name from a combobox if the name is not in the table (ie the query returns null) can i stop...
4
by: garyusenet | last post by:
I have a login form, which i have made by simply modifying the standard wizard created form from Visual C# express - when I chose a windows application. I have two buttons on my login form. ...
2
by: str1ker | last post by:
Hi, I'm sorry that this question is really noobish, but I've looked in the help file, I've just tried using help from the intelisense, but I have no idea as to how I can open another form. In...
22
by: questionit | last post by:
I am trying to open Sub Form using the command below, but i am getting error. Please confirm if i can open sub form using this command: Call DoCmd.OpenForm("Forms!!", acNormal, , , ,...
3
by: bdbeames | last post by:
Ok I have a form validation problem that I need one of you javascript ninja s to help me with. The following is a form with the javascript that I have used for the last year or two to validate. ...
6
by: ganeshvkl | last post by:
hi, My project is VB.net with Sql server 2000. i store image in database now the database size is around 400 MB. when i Click the form (image i have stored & Retrieved), it takes around 3...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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
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.