Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Information on separate Forum

Status
Not open for further replies.

Herdrich

Technical User
Dec 30, 2008
83
0
0
US
Here is my issue I have a user interface that allows a person to enter their information in then sends it to a table. I have another form for the technician that reads from the same database. Right now when someone enters their information it will not show up on the datasheet part of the split forum. I have to manually refresh the data for it to show up. Is there any way that when someone submits their information on the input computer that it will automatically update the forum on the technician computer? Any ideas would be greatly appreciated.
 
You can requery the form:

From a button;
At a specific interval;
In a relevant event.

If you use a timer, you could check the form record count against the table record count at regular intervals and prompt for a requery if there is a difference.

 
I am currently using a requrey on a timer. I was just wondering if i could link the requrey to when someone enters their information. Also is there a way to prompt the technician when a new customer signs in. Like a pop up when a new record is found.
 
I guess who ever is entering the information will be using their own front-end, so the technician's front-end will not be visible to that system, however, you can check the record count, as I mentioned.

Code:
NewCust=DCount("*","CustomerTableOrQuery")-Me.Recordset.Recordcount
If NewCust>0 Then
    If MsgBox("There are " & NewCust " new customer(s) " _ 
     & "Requery form?",vbYesNo)=vbYes Then
    End If
End If

However, this does not take account of deletions, if they occur. If the Customer table has a Key, then you could check if the max (DMax) key in the table is greater than the form.

Finally, you can have a field in a control table set to a value when a new customer is added or deleted and re-set when the technician form is requeried. You could even have it set to a value when the data-entry person logs out, so you can stop checking and tell the technician to relax :)

 
Im not really familure with insurting code into Access Databases whare should i be putting the code that you showed me above?
 
Code:
NewCust=DCount("*","data")-Me.Recordset.Recordcount
If NewCust>0 Then
    If MsgBox("There are " & NewCust " new customer(s) " _ 
     & "Requery form?",vbYesNo)=vbYes Then
    End If
End If

So i figured out that i had it in the right place its just not working for me. Im thinking i have to change NewCust to something in my data table but cant figure out what. Inside my data table i have Last Name, First Name, Rank, Time, Date and Reason for Visit.
 
NewCust is not particularly relevant, it is just a place to store a number. The important bit is DCount. You can test if DCount is working properly by typing in the immediate window:

?DCount("*","data")

You can test that the timer is working properly with a message box. Have you checked that you have set the Timer Interval property to a suitable number? 1000=1 minute, as far as I recall.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top