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

Comparing user input with a table on click

xpun
39
Hey all

Im working on a project that requires me to check if the member number that is input in the form is equal to an existing member number.

The problem is that even if the member number is correct the error message pops up and says it doesn't exist.

am i referring to my fields correctly? there is a direct relationship set up between the two. membernum and mnum

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command9_Click()
  2. If Membernum <> Mnum Then
  3. Dim x As Integer
  4. x = MsgBox("Not an Existing Member", vbOKOnly, MemberError)
  5. End If
  6. End Sub
Apr 23 '07 #1
3 1504
pks00
280 Expert 100+
What is the field on the form and what is the table field?
What is Membernum and what is Mnum?

Have u confirmed that both fields have a value? Im assuming u are already populating one field

to confirm, simply place a msgbox before the check

msgbox "Membernum=" & Membernum
msgbox "Mnum=" & Mnum

if one is empty, u can always use DLOOKUP to check
eg

DLOOKUP("fieldname","tablename")

optionally add criteria and it returns null if no recs found

eg
If IsNull(DLOOKUP("fieldname","tablename","fieldname= '" & enteredvalue & "')) = True then
msgbox "not found"
end if
Apr 23 '07 #2
xpun
39
mnumber is the member number entered in on a separate form , mnum refers to the member on a transactions form

i tried those messaged boxes and Membernum (the field form the seperate table pops up blank
Apr 24 '07 #3
xpun
39
mnumber is the member number entered in on a separate form , mnum refers to the member on a transactions form

i tried those messaged boxes and Membernum (the field form the seperate table pops up blank
i forgot to mention that Mnum and membernum are in separate tables
Apr 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: David | last post by:
I've got a 50k main.css file that's referenced by a load of sites. Each of these sites also has a site.css file that modifies certain styles defined in main.css. Changing the colour of borders,...
3
by: Robert Dell | last post by:
I have a problem comparing strings in an order form i'm writing. I want to give a running total at the bottom of the page and it appears to be working except it doesn't compare correctly (it...
6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
1
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
0
by: loga123 | last post by:
Hi All, I am very new to .net and trying to develop a small application. I am using asp .net 2.0. I have a table control (server) in my code that has header row like this. <asp:Table...
2
by: underground | last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is the form <? include("include/session.php");...
1
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
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...

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.