Nico! :)
I'd actually read that thread and downloaded the sample.mdb previously in my searches through this site (I always search on your posts first!! hehe). I couldn't get the sample to work as it kept throwing up a 3038 runtime error. After your post here I thought I would take another look at the sample and it finally occurred to me that the 3038 error was because the file came down in read-only state. Voila! Fixed, I can now see...
User Profile
Collapse
-
Help needed with moving items between two listboxes
Hello everyone, there are many questions and answers relating to moving items between two listboxes here and on the net in general, however, none answer my specific problem.
I have two listboxes on a form. The first listbox is populated according to command buttons (Command 14 & Command 15) that are clicked by the user (draws data via SQL statement - see code below). The second listbox is populated by user selection from the first... -
Hello again anuragshrivasta va, :)
Thank you again for replying.
Thanks also for the code tweak. I've probably not asked the question correctly in the first place. I'm actually looking not for an actual solution but an understanding of how to deal with errrors within VB in a very general sense. The code at the top is just a test code to see how the whole error trapping and handling event is carried out, and to show that...Leave a comment:
-
Hello anuragshrivasta va
Thank you for your reply.
What I am trying to achieve is to stop the built-in error handling from occuring when the code encounters an error. The variable aNumber is set as a double to capture all digits (both whole and decimal) and the code will work fine with a number entered. However, enter a text character and the built-in error handler returns a type mismatch error, which is expected due...Leave a comment:
-
Error Handling/Trapping Question
Hello again,
Its been a while since I've asked a question, I've been learning steadily reading the How To's and the questions in this forum, as well as reading my Access VBA and Access bibles till they are now in tatters!.
I'm stuck with understanding the error handling process by VB6.5 (in particular for MSAccess 2003).
The following code is a test code only, so that I could understand things before I... -
Heh! Lovely shade of vbRed!
I tried both "else:" and "select" and neither would execute as intended. It is really weird, everything stopped as soon as I introduced a second Else statement or a second Case, it drove me crazy! In the end I just went back to a basic "if" which is the only way the wretched thing would work (sans "end if"). The only thing I can think of that may be interfering is...Leave a comment:
-
Hello again Nic!
Sorry for the long delay in replying to your last post.
I finally figured out what was going wrong with at least some parts of my problem (still working through the reasons why F8 wont step through the code on my home PC).
Thanks for the tip on where to declare that variable and also the tip of not running with a sub.
This is the final effort (posting this in case its useful...Leave a comment:
-
Thanks for your reply Nic.
I've now changed the sub to a function and renamed frmLoader (gah cant believe I did that) as FormLoader.
At this stage I have not been able to F8 through the code no matter where I break - I've tried to do this over and over, and don't understand why it wont step. This has me stumped. F8 works fine on any other code I have - just not on this particular class object. Code in Excel will F8,...Leave a comment:
-
Hi again Nic =).
Thanks for that. I've now changed around the open and close, however I'm still having the same problem as I h had before. It doesnt seem to want to execute the frmLoader sub no matter where in the LogOn sub I put the call. What am I doing wrong? Here is my latest coding attempt (I've bolded the changes):
...Code:Option Compare Database Dim intLogins As Integer Private Sub cboUserID_AfterUpdate()
Leave a comment:
-
G'day again Nic,
Firstly thank you very much for your time - it is greatly appreciated.
I set the breakpoint as per your last post. Pressing the cmdLogOn button and switching back to the VB window still doesn't show any changes in either the watched variables or the immediates.
The original code for LogOn works fine - it loads up the default form without a problem. As soon as I add these lines (lines 3,...Leave a comment:
-
G'day Nic!
Thanks for your reply.
I've removed that class module =) thanks for that.
I set breakpoints at various places, however as I have to actually run the form to trigger the code (I can't seem to trigger from within the VB window - possibly because its running from the user input?) when I flick back to the code I can't actually see what its doing.
I set watches on the both cboUserID and...Last edited by JodiPhillips; Oct 10 '07, 12:35 AM. Reason: Omission of what happens when form is runLeave a comment:
-
Extension of LogIn Table to display form based on user status
G'day,
I have a silly and simple problem that I need some guidance with.
Due to the way our network is set up, I am unable to use the group permissions for Access and have had to implement log in procedures via a log in table within the database. This works fine. I have now expanded this table to include further data about the authorised user – Power User, Team Leader, & Facilitator.
Depending... -
-
Access startup - can you run code on database open?
MS Access2000
Hi everyone,
I've searched the forums for an answer to this question and nothing jumps out at me.
When a database is opened I want to automatically run code (at start-up) that compares the path of the opened database to a specific path (where the original database is located). This is for security reasons - I need to know if the original database has been copied without authorisation. Due... -
Gawd! I apologise sincerely for this "stupid" and "ignorant" question!! Have since done some other reading and now realise that this is wayyyyyy off the planet.
Jodi...Leave a comment:
-
Awesome Rabbit!!
Thank you bunches!
Actually, the penny has dropped finally about functions, once you posted your solution, I really did look at it and what it was doing and YAY, I understand now!!
Hehe, it also prompted me to look at some other things - yeah I went off on a tangent, but that in itself was great. LOL now I gotta go find my last post which has a very "stupid" and "ignorant"...Leave a comment:
-
Hi Rabbit thanks so much for your help.
Do I create the global variable by just 'dim variable_name as string, int etc' in a public sub?
For the public functions would this be querydef and recordset? Gah I'm hopeless.
I'm probably thinking of this from the wrong perspective, by wanting to just enter the variable name in each query criteria box. So if I create the public functions, the code (via the functions)...Leave a comment:
-
Can you spec code in an SQL statement or query?
Hello again,
I'm having a lot of trouble understanding the interaction between code and SQL. I have several queries that drive various reports and forms in my db and each query contains a common parameter, that of the persons User ID. At the moment my users log in via a log in page which refers back to the logIn table where the id and password are stored. This part works fine. The User Id is captured via a cbo called cboUserId.... -
.oft is an Outlook file template. Not sure if you can combine a CDO message and open a template file at the same time? I'm looking at doing this but not sure if I'm going about it the right way.
Edit: typos and sentence restructure...Leave a comment:
-
No activity results to display
Show More
Leave a comment: