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

Can anyone help me with this problem this code bring back no errors

Expand|Select|Wrap|Line Numbers
  1. Public Function YearAdd()
  2. NextReveiw = DateAdd("yyyy", 1, [ReveiwDate])
  3. End Function
  4.  
  5. Public Function DateDiff()
  6. ReveiwMonths = DateDiff("m", ReveiwDate, NextReveiw)
  7. End Function
  8.  
  9. Private Sub Form_Current1()
  10.    If ReveiwMonths >= 1 Then
  11.       ReviewMonths.Visible = True
  12.       ReviewMonths_label.Visible = True
  13.      Else: ReveiwMonths.Visible = False
  14.       ReveiwMonths_label.Visible = False
  15.    End If
  16.    If ReveiwMonths <= 0 Then
  17.       MsgBox "Reveiw Is Overdue"
  18.       ReveiwMonths.Visible = False
  19.       ReveiwMonths_label.Visible = False
  20.     End If
  21.    If IsNull(ReveiwDate) Then
  22.       ReveiwMonths.Visible = False
  23.       ReveiwMonths_label.Visible = False
  24.    End If
  25. End Sub
Apr 22 '10 #1
9 1259
tlhintoq
3,525 Expert 2GB
O.P.:Can anyuone help me with this problem this code bring back no errors
If it has no errors then what's the problem? What do you need help with?

I recommend you read the FAQ about How to ask a good question so the volunteers will be able to help you.
Apr 22 '10 #2
tlhintoq
3,525 Expert 2GB
TIP: When you first created your question you were asked to wrap your code with [code] tags.

It really does help a bunch. Look how much easier it is to read now that someone has done it for you. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Apr 22 '10 #3
@tlhintoq
It dosent work i have used the debug tool and im fairly sure it is written correctly i get no error messages but it just dose not do anything
Apr 22 '10 #4
tlhintoq
3,525 Expert 2GB
Habilatate: It dosent work
What does that mean? All code does exactly what you tell it to do: It can do nothing else. So by 'working' you must mean it doesn't produce the results you expected. But nobody here knows what you expect it to do: We only know what you coded it to do. Someone reading your code *might* be able to infer what you were trying to accomplish, but it would be a lot easier and lot less prone to mis-interpretation if you could tell us what you expected it to do.
Apr 22 '10 #5
tlhintoq
3,525 Expert 2GB
The code you have shown has a couple functions and a sub but there is no context of operation for us to see. We can't see your operation logic, meaning we don't have any idea when the sub is called. Does it happen when you click a button, when a timer expires, only once when the application is run
Apr 22 '10 #6
@tlhintoq
Sorry for not being clear i appreciate your help the code is supposed to modify a form i am trying to create a new box which will tell me howmany months there are till an employees next reveiw there dosent appear to be any errors but i get nothing
Apr 22 '10 #7
tlhintoq
3,525 Expert 2GB
tlhIn'toq: But when does the function run?????
Maybe it doesn't 'work' because you never call it.
Apr 22 '10 #8
@tlhintoq
what does that mean i am sorry to trouble you how do i call it any help would be really appreciatede
Apr 22 '10 #9
tlhintoq
3,525 Expert 2GB
http://www.amazon.com/Microsoft-Visu...1960428&sr=8-6

I'm not trying to be rude. But "How do I write my first program?" is not something we can teach here.
Apr 22 '10 #10

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

Similar topics

2
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
2
by: Kavitha Rao | last post by:
Hi, I am getting the following errors while trying to run this snippet in Microsoft Visual C++.Can't seem to print the crc value stored. /* +++Date last modified: 05-Jul-1997 */ /* Crc - 32...
6
by: Andrew Mueller | last post by:
Hello all, There is a message below 'Application Error... When querying data'. What appears to be happening is that when I perform a lot of queries in a row and bring back the information into...
3
by: Anthony Nystrom | last post by:
This is really getting old and frustrating... For now reason that I can determine my copy and paste functionality is gone, as well as bring to front bring to back etc... Only happens in the...
31
by: Jim Hubbard | last post by:
I am downloading the REALbasic 5.5 demo and was just wondering if anyone else had tried it. I am tired of Microsoft constantly changing things and breaking backward compatibility ON PURPOSE. ...
13
by: dbuchanan | last post by:
This code resets a form with two cbo's (comboBoxes) and one datagrid. The first cbo (cboSelection) selects a main table and filters the second cbo. The second cbo (cboView) selects the secondary...
40
by: Jeff | last post by:
I have a system on a network and want to determine if anyone is currently connected to the back-end files. An interesting twist is that I have noticed that some users can be connected (have the...
4
by: VMI | last post by:
In the next few weeks, we'll be discussing what standards will be used for our web development, and one of the suggestions was to use a code generator (in our case, the first version of LLBLGen)....
10
by: spacebebop | last post by:
#include <cstring> #include <iostream> using namespace std; class X { public: X(); X( char * ); ~X();
1
by: swethak | last post by:
Hi, How to do the bring front and bring back an images using javascript.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.