REFRESHING DATA (1 Viewer)

ath23

Registered User.
Local time
Today, 06:41
Joined
Jan 14, 2001
Messages
12
Hi,

This may be a simple question...I have one tab form called main menu, which contains an unbound text box, and displays all entries entered.

Now my question is..is there a way to create in the data entry form a 'Back To Main Menu' command button, that on click, it will:
1. Take you back to the main menu form, AND
2. Refresh the unbound text box with the latest entry.

Currently, i have to click another tab, or exit the database all together in order to refresh.

thanks a million.
 

RpbertS

Registered User.
Local time
Today, 06:41
Joined
Feb 14, 2000
Messages
93
sure is bud try this:
Private Sub cmdbackrefresh_Click()
On Error GoTo Err_cmdbackrefresh_Click

Dim stdocname As String
Dim stlinkcriteria As String

stdocname = "mainformname"
unboundtextbox.requery
DoCmd.OpenForm stdocname, , , stlinkcriteria

Exit_cmdbackrefresh_Click:
Exit Sub

Err_cmdbackrefresh_Click:
MsgBox Err.Description
Resume Exit_cmdbackrefresh_Click

End Sub

let me know how it works out, it may need a little tweaking
 

ath23

Registered User.
Local time
Today, 06:41
Joined
Jan 14, 2001
Messages
12
Thanks RpbertS..

Sorry to trouble you again, but I am an absolute newbie to both Access and VBA....

it didn't work for some reason...any other suggestion?
 

Users who are viewing this thread

Top Bottom