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

Refreshing Data

I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:

Private Sub Calls_Click()
On Error GoTo Err_Calls_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "CallsForm"

stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub

Aug 13 '07 #1
4 2108
well, if i understand you correctly, the combo box you're concerned with is
on the second form, not the first form. sounds to me like you just need to
write the first form's record to disk before calling the second form. try
the following, as

Private Sub Calls_Click()
On Error GoTo Err_Calls_Click

Dim stDocName As String
Dim stLinkCriteria As String

If Me.Dirty Then Me.Dirty = False
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub

hth
"magmike" <ma******@yahoo.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:

Private Sub Calls_Click()
On Error GoTo Err_Calls_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "CallsForm"

stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub

Aug 14 '07 #2
magmike <ma******@yahoo.comwrote in
news:11**********************@g4g2000hsf.googlegro ups.com:
I have a contact form that once the contact information is
filled out, a button is pressed by the user to pull up another
form that schedules a call back date and time for that record.
If you hit that button on a current record that already has a
call back scheduled, it will show that information for that
contact already in the form. If nothing is scheduled, the pull
down box for that new record will be blank. Of course, the new
record will not show up in the pull down box unless I hit the
refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me,
what I am attempting to do is cause a refresh of the first
form while invoking the call back button (so the new contact
will appear in the drop down box without seperately hitting
the refresh button), and/or if possible when clicking on the
call back button, having a new call back record created, with
the current (new) contact already selected in the contact drop
down box. Here is my current code for the button:
add a line of code to save the new/changed record before opening
the form
Private Sub Calls_Click()
On Error GoTo Err_Calls_Click
if Me.Dirty = True then Me Dirty = False 'forces save of record,
>
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "CallsForm"

stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub



--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 14 '07 #3
On Aug 13, 10:55 pm, "tina" <nos...@address.comwrote:
well, if i understand you correctly, the combo box you're concerned with is
on the second form, not the first form. sounds to me like you just need to
write the first form's record to disk before calling the second form. try
the following, as

Private Sub Calls_Click()
On Error GoTo Err_Calls_Click

Dim stDocName As String
Dim stLinkCriteria As String

If Me.Dirty Then Me.Dirty = False
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub

hth

"magmike" <magmi...@yahoo.comwrote in message

news:11**********************@g4g2000hsf.googlegro ups.com...
I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:
Private Sub Calls_Click()
On Error GoTo Err_Calls_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Calls_Click:
Exit Sub
Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click
End Sub- Hide quoted text -

- Show quoted text -
That's awesome, thanks!

Aug 15 '07 #4
you're welcome :)
"magmike" <ma******@yahoo.comwrote in message
news:11**********************@50g2000hsm.googlegro ups.com...
On Aug 13, 10:55 pm, "tina" <nos...@address.comwrote:
well, if i understand you correctly, the combo box you're concerned with
is
on the second form, not the first form. sounds to me like you just need
to
write the first form's record to disk before calling the second form.
try
the following, as

Private Sub Calls_Click()
On Error GoTo Err_Calls_Click

Dim stDocName As String
Dim stLinkCriteria As String

If Me.Dirty Then Me.Dirty = False
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Calls_Click:
Exit Sub

Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click

End Sub

hth

"magmike" <magmi...@yahoo.comwrote in message

news:11**********************@g4g2000hsf.googlegro ups.com...
I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:
Private Sub Calls_Click()
On Error GoTo Err_Calls_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Calls_Click:
Exit Sub
Err_Calls_Click:
MsgBox Err.Description
Resume Exit_Calls_Click
End Sub- Hide quoted text -
- Show quoted text -

That's awesome, thanks!

Aug 16 '07 #5

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

Similar topics

10
by: Philo Del Middleston | last post by:
I've been searching, but apparently not phrasing my search right, so I'm going to float a question out here in the meantime... I'm wondering how to go about refreshing the content of a control...
1
by: sentinel | last post by:
Hello, I'm having problems refreshing a main window, and am not sure really whether the solution will be Javascript or PHP related. Firstly, I have a main file that calls a pop-up box which...
1
by: LRD | last post by:
Form not refreshing after autopostback unless keyboard or mouse move Hi, We created several new ASP.NET C# forms for our intranet. In each form we use panels for different sections of the...
5
by: Scott Tilton | last post by:
I am having a terrible time getting this to work. I am hoping someone out there can help me with very specific code examples. I am trying to get the linked tables in my Access 97 database to be...
1
by: Hans | last post by:
I have a Windows.Forms.Form containing a DataGrid where the DataSource is a DataView. Everything refreshes fine after adding, deleting or editing rows. When I close the dialog and reopen it with a...
5
by: Jensen Bredal | last post by:
Hello, I need to display self refreshing information on a web page written with asp.net. I would image that the info would be displayed either as part of a user control or a web control. How can...
1
by: Jennyfer J Barco | last post by:
Hello I have a datagrid and a linkbuttom in the datagrid that says Picture, every time I click on the link "Picture" my program opens a popup window showing a picture of the item the selected and...
0
by: sean.hpr | last post by:
Hi all- I am a vb2005 newb so apologies in advance. Essentially I am having some problems with data refreshing on some of my forms. Background: I have created a project containing a few...
5
by: chimambo | last post by:
Hi all, I have a problem with maintaining data without refreshing manually in my system. I have a system which carries data across several pages. But if a user wants to go back to the previous...
13
by: honey99 | last post by:
Hi! I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window...
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:
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.