PC Review


Reply
Thread Tools Rate Thread

applicaton.echo / docmd.echo screen still pulsing - Why?

 
 
Rick A
Guest
Posts: n/a
 
      29th Mar 2006
I've tried both application.echo and docmd.echo and my form still flashes after I make a selection from my combo box.

I want the code to go off and collect the information and then display the screen.

Here's a snippet of the code. The user selects a name from the combo box and the information is displayed. I expect the screen to snap into place and instead I'm seeing a couple of pulses (if you will). It's like it is still thinking about something after the code runs.

Any idea would be wonderful.

Private Sub cboSelectRegisteredName_AfterUpdate()
Call AfterSelectionRoutine("cboSelectRegisteredName")
End Sub

Function AfterSelectionRoutine(strControl As String) As String
' this routine executes after a dog is selected.
Application.Echo False, "thinking...."
DoCmd.Echo False

' turn the controls on for the detail section of the form,
' set focus, turn off the controls for the header section,
' enagle the cancel button and the apply button
EnableControls Me, acDetail, True

Me!lstQuickEntry.SetFocus
EnableControls Me, acHeader, False
Me!cmdCancel.Enabled = True
Me!cmdApply.Enabled = True
' finally enable the controls on the dog event subform
EnableControls fsubUniversalGenericEntryDogEvent.Form, acDetail, True

' populate the event dates listbox one time after load
' this will speed up initial load of the form.
If Me.lstEventDates.RowSource = "" Then
strSQL = "SELECT EventDateID, " & _
"IIf(DLookUp('OrganizationCD','qrySelectControlApplicationData')='CKC','#' & EventDateDescription & ' ' & Format(EventDate,'dddd'),Format(EventDate,'ddd mmm-dd-yyyy')) AS FormatedEventDate, " & _
"EventDate " & _
"FROM qrySelectEventDate; "
Me.lstEventDates.RowSource = strSQL
' also populate title list listbox based on first row of the
' event dates listbox and after the first load of the event date
strSQL = "SELECT [TitleID], [TitleEventDateID], [Title] " & _
"FROM qrytblTitleEvent WHERE EventDateID=" & Me.lstEventDates.ItemData(0)
Me.lstTitleList.RowSource = strSQL

Me.lstJumpHeight.RowSource = "qrySelectJumpHeight"

Me.lstISCJumpHeight.RowSource = "qrySelectJumpHeightISC"

Me.lstQuickEntry.RowSource = "qrySelectForQuickEntry"
Me.txtEntryFor.Visible = True
Me.txtClassesFor.Visible = True
Me.txtTitlesFor.Visible = True
End If

' position on the first row of the event dates listbox
' Me.lstEventDates = Me.lstEventDates.ItemData(0)


' Set up the dog entry listbox based on what dog was selected
strSQL = "SELECT DogID, TitleEventDateID, EventID, " & _
"Format([EventDate],'ddd dd-mmm-yyyy') AS [Event Date], " & _
"EventDateDescription as [Trial Number], TitleAbbreviated as [Title], " & _
"JumpHeightCD as [Jump Height] " & _
"FROM qrySelectDogEntry " & _
"WHERE DogID = " & Me.Controls(strControl).Value & " and " & _
"EventID = " & Me.txtEventID & " " & _
"ORDER BY EventDate, EventDateDescription, CatalogSortOrder"
Me!lstDogEntry.RowSource = strSQL

' set the record source for the form. It is the information for the
' most recently selected dog. The dog selected can be one of three options
' that's why me.control(strcontrol).value is used
Me.RecordSource = "Select * from qrySelectDog WHERE DogID = " & Me.Controls(strControl).Value

' Me.grpJumpHeight = DLookup("JumpHeightinInches", "qrySelectDogsInEventEntry", _
"DogID=" & Me.cboSelectRegisteredName)

' go get the arm band number for the selected dog.
Me!lstArmBandNumber.RowSource = BuildABNListBox(Me!DogID.Value, Me!txtEventID, Me)

' set the other selection combo boxes on the form so they all say the same dog.
Me!cboSelectRegisteredName.Value = Me.Controls(strControl)
Me!cboSelectCallName.Value = Me.Controls(strControl)
Me!cboRegistrationNumber.Value = Me.Controls(strControl)

DoCmd.Echo True
Application.Echo True, "ready"
End Function

--
Rick Allison
 
Reply With Quote
 
 
 
 
Rick A
Guest
Posts: n/a
 
      30th Mar 2006
Never mind.

I had a pop-up model form and echo does not work. Changed it to a normal form and all is okay.

--
Rick Allison
"Rick A" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
I've tried both application.echo and docmd.echo and my form still flashes after I make a selection from my combo box.

I want the code to go off and collect the information and then display the screen.

Here's a snippet of the code. The user selects a name from the combo box and the information is displayed. I expect the screen to snap into place and instead I'm seeing a couple of pulses (if you will). It's like it is still thinking about something after the code runs.

Any idea would be wonderful.

Private Sub cboSelectRegisteredName_AfterUpdate()
Call AfterSelectionRoutine("cboSelectRegisteredName")
End Sub

Function AfterSelectionRoutine(strControl As String) As String
' this routine executes after a dog is selected.
Application.Echo False, "thinking...."
DoCmd.Echo False

' turn the controls on for the detail section of the form,
' set focus, turn off the controls for the header section,
' enagle the cancel button and the apply button
EnableControls Me, acDetail, True

Me!lstQuickEntry.SetFocus
EnableControls Me, acHeader, False
Me!cmdCancel.Enabled = True
Me!cmdApply.Enabled = True
' finally enable the controls on the dog event subform
EnableControls fsubUniversalGenericEntryDogEvent.Form, acDetail, True

' populate the event dates listbox one time after load
' this will speed up initial load of the form.
If Me.lstEventDates.RowSource = "" Then
strSQL = "SELECT EventDateID, " & _
"IIf(DLookUp('OrganizationCD','qrySelectControlApplicationData')='CKC','#' & EventDateDescription & ' ' & Format(EventDate,'dddd'),Format(EventDate,'ddd mmm-dd-yyyy')) AS FormatedEventDate, " & _
"EventDate " & _
"FROM qrySelectEventDate; "
Me.lstEventDates.RowSource = strSQL
' also populate title list listbox based on first row of the
' event dates listbox and after the first load of the event date
strSQL = "SELECT [TitleID], [TitleEventDateID], [Title] " & _
"FROM qrytblTitleEvent WHERE EventDateID=" & Me.lstEventDates.ItemData(0)
Me.lstTitleList.RowSource = strSQL

Me.lstJumpHeight.RowSource = "qrySelectJumpHeight"

Me.lstISCJumpHeight.RowSource = "qrySelectJumpHeightISC"

Me.lstQuickEntry.RowSource = "qrySelectForQuickEntry"
Me.txtEntryFor.Visible = True
Me.txtClassesFor.Visible = True
Me.txtTitlesFor.Visible = True
End If

' position on the first row of the event dates listbox
' Me.lstEventDates = Me.lstEventDates.ItemData(0)


' Set up the dog entry listbox based on what dog was selected
strSQL = "SELECT DogID, TitleEventDateID, EventID, " & _
"Format([EventDate],'ddd dd-mmm-yyyy') AS [Event Date], " & _
"EventDateDescription as [Trial Number], TitleAbbreviated as [Title], " & _
"JumpHeightCD as [Jump Height] " & _
"FROM qrySelectDogEntry " & _
"WHERE DogID = " & Me.Controls(strControl).Value & " and " & _
"EventID = " & Me.txtEventID & " " & _
"ORDER BY EventDate, EventDateDescription, CatalogSortOrder"
Me!lstDogEntry.RowSource = strSQL

' set the record source for the form. It is the information for the
' most recently selected dog. The dog selected can be one of three options
' that's why me.control(strcontrol).value is used
Me.RecordSource = "Select * from qrySelectDog WHERE DogID = " & Me.Controls(strControl).Value

' Me.grpJumpHeight = DLookup("JumpHeightinInches", "qrySelectDogsInEventEntry", _
"DogID=" & Me.cboSelectRegisteredName)

' go get the arm band number for the selected dog.
Me!lstArmBandNumber.RowSource = BuildABNListBox(Me!DogID.Value, Me!txtEventID, Me)

' set the other selection combo boxes on the form so they all say the same dog.
Me!cboSelectRegisteredName.Value = Me.Controls(strControl)
Me!cboSelectCallName.Value = Me.Controls(strControl)
Me!cboRegistrationNumber.Value = Me.Controls(strControl)

DoCmd.Echo True
Application.Echo True, "ready"
End Function

--
Rick Allison
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NF325-A7 Sound problem: sounds like an echo ,,echo...echo makes me crazy...crazy...crazy...help...help...help David Sontag DIY PC 17 30th Nov 2007 06:45 AM
Echo multiple messages separated by new line thorugh "echo" command Vijay Jain Windows XP General 1 12th Dec 2006 09:11 PM
DoCmd.Echo True/False =?Utf-8?B?SmFjIFRyZW1ibGF5?= Microsoft Access VBA Modules 4 8th Dec 2005 12:47 AM
DoCmd.Echo False or Application.Echo False =?Utf-8?B?cmJt?= Microsoft Access Form Coding 3 28th Jan 2004 02:48 PM
Application.Echo or DoCmd.Echo in a Runtime Database =?Utf-8?B?cmJt?= Microsoft Access Form Coding 1 23rd Jan 2004 02:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:43 PM.