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

Add Button

I am tring to piggy back on this code, but needed some help. I have a combo box, and I've defined an "Add" Command button. So once a selection is updated from the combo, the "Add" button needs to be activated, and when "Add" button is clicked, sub-components of the value selected in the combo are then generated in the subform.

Thank you in advance for any help.

My code looks somewhat like this:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo362_AfterUpdate()
  2. Me.Refresh
  3.  
  4. Dim intNumOfDetails As Integer
  5. Dim strMsg As String
  6.  
  7. 'Will the Filter (Category/Standard) actually produce any Records?)
  8. intNumOfDetails = DCount("*", "[Standard Under Review]", "[Standard] = " & Me![Combo362] & _
  9.                           " And [Standard] = '" & Me![Combo362] & "'")
  10.  
  11. If Not IsNull(Me![Com]) Then      'must be an entry
  12.   If intNumOfDetails > 0 Then           'Filter produces Records
  13.     Me![Standard Under Review subform1].Form.Filter = "[Standard] = '" & Me![Combo362] & "'"
  14.     Me![Standard Under Review subform1].Form.FilterOn = True
  15.   Else
  16.     strMsg = "No Standard Under Review exist for Standard [" & Me![Standard] & "] and " & _
  17.              "[" & Me![Combo362] & "]!"
  18.       MsgBox strMsg, vbExclamation, "No Standard Under Review"
  19.   End If
  20. End If
  21.  
  22. End Sub
Regards,
Dhruvit
Sep 17 '09 #1
2 2108
NeoPa
32,556 Expert Mod 16PB
This post was split from the original thread (Main Form ComboBox to Filter Records in SubForm) as it is a hijack. I suspect this was innocently done, but in future each new request must be posted in its own thread. It's perfectly acceptable of course to link to other threads if they contain anything you think may be relevant or helpful.
Sep 17 '09 #2
NeoPa
32,556 Expert Mod 16PB
As to your question, it seems to be a simple request for someone to provide a solution. Maybe I'm misreading it but I don't see a real question here.

Perhaps if you were to rephrase the question (without relying on the code to explain what you want) someone may be able to help.
Sep 17 '09 #3

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

Similar topics

3
by: Matt | last post by:
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form...
6
by: Skip Hollowell | last post by:
I am working on a menu bar for a site, and am using buttons in the bar (because the customer wants to use accessKeys for each selection, apparently it is too much work to click on them with a...
5
by: TrvlOrm | last post by:
Can any one please help me...I am new to JavaScript and I have been struggling with this code for days now and can't figure it out. I would like to get the Buttons to correspond with the action...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
3
by: Zürcher See | last post by:
Someone has implemented a Datagrid Button for the Windows.Form?
18
by: jrhoads23 | last post by:
Hello, I am trying to find a way to tell if an .NET windows forms Button (System.Windows.Forms.Button) is "depressed" (pushed down). For my application, I can not use a check box control set to...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
7
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, I create button in the code ( Dim Button as new Button), not using button web component (means not drap button and drop it ont he webform), after that I try to use button_click event,...
23
by: shashi shekhar singh | last post by:
Dear sir, I have a word document file contains text and images, now i have saved it as a web page and wants to display it on browser , using , string str=directory.getfiles("");...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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
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?
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...

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.