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

Updating a textbox on a form

418 256MB
frmEchoEnter has a subform which does not get activated unless the user selects an Echo Number. cboEchoSelect displays a list of Echo Number available to select.

To add to the avaialbe Echo Number I have this


Not In List

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboEchoSelect_NotInList(NewData As String, Response As Integer)
  2.     MsgBox "Double-click this field to add a New ECHO number to the list."
  3.     Response = acDataErrContinue
  4. End Sub
On Double Click

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboEchoSelect_DblClick(Cancel As Integer)
  2. On Error GoTo Err_cboEchoSelect_DblClick
  3.  
  4.     If IsNull(Me![cboEchoSelect]) Then
  5.         Me![cboEchoSelect].Text = ""
  6.     Else
  7.                 Me![cboEchoSelect] = Null
  8.     End If
  9.     DoCmd.OpenForm "frmECHO", , , , , acDialog, "GotoNew"
  10.     Me![cboEchoSelect].Requery
  11.  
  12.  
  13. Exit_cboEchoSelect_DblClick:
  14.     Exit Sub
  15.  
  16. Err_cboEchoSelect_DblClick:
  17.     MsgBox Err.Description
  18.     Resume Exit_cboEchoSelect_DblClick
  19. End Sub
After Update
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboEchoSelect_AfterUpdate()
  2.  
  3. Me.Filter = "[ECHOID]=" & Me![cboEchoSelect]
  4.  Me.FilterOn = True
  5.      EnableControls Me, acDetail, True
  6.      sfrmAP.Enabled = True
  7.      sfrmPayroll.Enabled = True
  8.  
  9.  
  10. End Sub
Everything is working except that after I add a new Echo Number, I must exit frmEchoEnter for the new number to be available on the list. What codes do I need to solve this problem?
  • I want to double click the combo box,
  • add the new number to frmEcho,
  • close fromEcho and
  • keep adding data to frmEchoEnter.

Thanks.
Jun 18 '09 #1
0 1170

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

Similar topics

7
by: trint | last post by:
I have a textbox (textBox7) that isn't updating.. Is there a way, after I type new text in it, to have it update? It seems to be fairly normal: public class Form1 : System.Windows.Forms.Form {...
4
by: Darrel | last post by:
I'm creating a table that contains multiple records pulled out of the database. I'm building the table myself and passing it to the page since the table needs to be fairly customized (ie, a...
10
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: ...
22
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
0
by: stosh259 | last post by:
Hi everyone, Anyone have a generic procedure to updating different types of controls on a form. I have text boxes and switches (booleans). I would like to loop through all the controls and...
2
by: toddw607 | last post by:
Hi Everyone! I have a ASP.NET webform that brings data in from SQL Server 2000 and displays it on a page. I want to update the webpage while in IE using the following code: <%@ Import...
15
by: slinky | last post by:
Thanks in advance fo rany help... I have an XML data file (well- formed) that I need to place into my website's app_data folder. I would like to have an .aspx form on my site that simply has two...
3
by: Spoogledrummer | last post by:
Hi it's me again, still working on the sam 5 minute problem so feeling kind of thick now. I've dumped the idea of using a textarea for now and am using a textbox instead but am struggling when it...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.