473,763 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Instant Messenger

Hi All,
I am trying to create an instant messenger tool within the database,
mainly so messages can be left for colleagues on different shifts (not all
of them have a mail account). I have created a table with the following
fields:
from (text) default value = username obtained from module which gets unique
network username
to (text)
sent (date/time) default value = now()
message (memo)
received (yes/no)

I have created an event procedure on timer (main form) so that if a record
exists in the messages table where [from] = current user and [received] =
false a form will open displaying the message.

I am new to this and I have not got the procedure right. If a message exists
where I am not the desired recipient, the form still opens.
Could anyone tell me where I am going wrong?

Private Sub Form_Timer()
If (DLookup("[to]", "messages", "[to]") = (Me!current_use r.Value) & _
DLookup("[received]", "messages", "[received]") = False) Then
DoCmd.OpenForm "message_po pup"
End If
End Sub

TIA,

Mark
Nov 13 '05 #1
1 4909
"Mark R" <ma*********@nt lworld.com> wrote in message news:<7e******* *******@newsfe1-gui.ntli.net>.. .
Hi All,
I am trying to create an instant messenger tool within the database,
mainly so messages can be left for colleagues on different shifts (not all
of them have a mail account). I have created a table with the following
fields:
from (text) default value = username obtained from module which gets unique
network username
to (text)
sent (date/time) default value = now()
message (memo)
received (yes/no)

I have created an event procedure on timer (main form) so that if a record
exists in the messages table where [from] = current user and [received] =
false a form will open displaying the message.

I am new to this and I have not got the procedure right. If a message exists
where I am not the desired recipient, the form still opens.
Could anyone tell me where I am going wrong?

Private Sub Form_Timer()
If (DLookup("[to]", "messages", "[to]") = (Me!current_use r.Value) & _
DLookup("[received]", "messages", "[received]") = False) Then
DoCmd.OpenForm "message_po pup"
End If
End Sub

TIA,

Mark

Mark,
Your syntax is a little off on the DLookUp
The equals sign goes inside the quotes with the field name
Put the value you are comparing inside the parens
If (DLookup("[to]", "messages", "[to] = " & Me!current_user .Value)) then
Hank Reed
Nov 13 '05 #2

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

Similar topics

0
2237
by: CountScubula | last post by:
Hello everyone. Ok, a lot of people here have emailed me about instant messenger, so I took some code out of a project I buit, and posted the code. You can find it here: http://www.gzentools.com/snippetview.php?c=Concepts&v=sendim.php
2
10937
by: Evan McPeters | last post by:
Does anyone have an example of a simple Instant Messenger program written in Python? I have some code for a simple server and simple client communicating over TCP/IP, so I could always combine both of those into each IM client, but perhaps there is a better way. Thank you.
1
2383
by: Peter | last post by:
Hi all, I have a website where users login to and I wish to add Instant Messenger between 2 users.. for instance, clicking "IM" on someone's profile (assuming they're online of course) will prompt the other user if they wish to chat or not.. if they do.. initiate 1-on-1 chat. I've seen it done on faceparty.com which I believe uses DigiChat (java). Unfortunately it's too expensive to purchase so I wish to develop a simplistic version...
10
10751
by: Dee | last post by:
Is C++ the best language to create a Windows based Instant Messenger? Something along the lines of MSN Messenger, ICQ, Yahoo Chat, etc? Are there any downloadable full or trial SDK's out there? I used to use Visual Basic a long time ago but want to create the fastest, easiest for the end user to install, most reliable software program possible
0
1393
by: Colin Tiernan | last post by:
Hi, Can someone please put me right here. I've been asked to send messages to instant messenger through my asp.net 1.1 website, as a feature of a message board that I had to hand code. I don't believe this is possible. IM is a client app that accesses a private server on its own port (i.e not accessible through normal web)
0
1211
by: Dean Sharp | last post by:
Hi For my university final year project i have been developing a instant messaging application based on the .net 1.1 framework. I would be very greatful if some people would give this application a quick 5 or 10 minute test for me and provide some feedback which i can uses in my project write-up. you can get the application from http://messenger.deansstuff.co.uk and there
6
2000
by: lalejo83 | last post by:
How do I go about starting an instant messenger in C++. pLEASE HELP ME
2
4367
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript timer to load the php page via ajax every 15 seconds which checks the "pinguser" table to see if the user has any chat requests, then echoes them to a div on the page. what i REALLY want to do is have the ajax page see if there is a ping for the...
1
1975
by: Tarren | last post by:
Hi: Are there any good c# libraries for integrating aol instant messenger capabilities into my c# code? Thanks, Tayo
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10145
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.