473,398 Members | 2,125 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,398 software developers and data experts.

Error 2467:Object closed or doesnt exist

3
Hello there I am having the above error and need assistance promptly please, I am trying to create an activity log table which logs the activities of users within my database, it seems to be working but having an issue of cannot populating the user details in the log table saying the above error mentioned.

Here is my current script below, I know that it is a minor error but cant seem to get around it :(



Private Sub ok_Click()
txtUsername.SetFocus

If txtUsername = "user" And txtPassword = "Testing123" Then
MsgBox "Access Granted", vbInformation, "Test"
DoCmd.Close
DoCmd.openform "Main Menu"

Else

MsgBox "ERROR: Please check your login details and try again."

End If

TempVars("UserName").Value = Me.txtUsername.Value
Oct 17 '17 #1

✓ answered by PhilOfWalton

I believe your problem may be you don't say what you want to close.

Try
Expand|Select|Wrap|Line Numbers
  1.     DoCmd.Close acForm, Me.Name
  2.  
Phil

3 1580
MikeTheBike
639 Expert 512MB
Hi

I would hazard a guess that you need to put this statement
Expand|Select|Wrap|Line Numbers
  1. TempVars("UserName").Value = Me.txtUsername.Value
before DoCmd.Close !!??

MTB
Oct 17 '17 #2
PhilOfWalton
1,430 Expert 1GB
I believe your problem may be you don't say what you want to close.

Try
Expand|Select|Wrap|Line Numbers
  1.     DoCmd.Close acForm, Me.Name
  2.  
Phil
Oct 17 '17 #3
roeti
3
Thank you Mike and Phil for your kind assistance. I did what you both advised and worked perfectly by putting the TempVars("UserName").Value = Me.txtUsername.Value in front of the DoCmd.Close statement and also added acForm, Me.Name next to DoCmd.Close statement. THANKS HEAPS !!!
Oct 17 '17 #4

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

Similar topics

3
by: KIPAX | last post by:
I am inserting values into a row.. works OK If I try to insert a value into a row that doesnt exist (using where) it always returns true the same as if it did work I want to update rows that...
0
by: Eclectic | last post by:
I am using the latest version of PHP and GD (reinstalled both today - march 29 2005) and am using GD to create thumbnails on the fly. I am having no issues with GD, however, I am now trying to...
1
by: Amin Schoeib | last post by:
Hi, When I Try to write Functions I always become the error That the language plpgsql doesn't exist. I tried it this way: createlang plpgsql template1 createlang -l template1 Procedural...
0
by: Faraz | last post by:
Hey guys, I got a wierd problem. I am trying to divide the proxy class that is generated for connecting to a web service as a superclass and a subclass. The error is The type or namespace name...
1
by: amayae | last post by:
I am getting this error when I try to compile. I am using visual studio c++ 7.0 I have a my file.h with the following: ( non member functions) Bag operator +(const Bag& b1, const Bag& b2); Bag...
1
by: Janez Kostanjček | last post by:
Hello everyone, this is my first post to postgres mailing list. System that I use: I am using Postgres under last CygWin published on public mirrors at the moment. OS system runing is...
0
by: IdleBrain | last post by:
Hello: I have written the following code in the main form close event procedure: If Not instfrmMain.rb1 Is Nothing Then instfrmMain.1.Checked = True But I still get an error from the JIT...
14
by: Eliot | last post by:
I have a project which may be compiled with some #defines. Say:- #define firstdef #define seconddef If no defines are present or only one is present all is OK. I would like to add a self...
1
swarnalaxmi
by: swarnalaxmi | last post by:
When i m using ApplicationResource.Resourcemanager for the strings.... i got that error as Error : The Name ApplicationResource Does not exist..... can u help me? thanks in advance swarnalaxmi
1
by: soundararajanom | last post by:
hi iam using this code for datagrid row storage while check data is exist or not in DB sql server 2008 cmd.Parameters.Value = row.Cells.Value; cmd.Parameters.Value = row.Cells.Value;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
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,...

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.