This combo box has the following event procedures:
1) KeyDown -- I track the last key to see if the user has entered characters or deleted/backspaced them
2) NotInList -- just gives an error message
3) DblClick -- double clicking on a publisher name in the combo box pops up a form with the...
when I use MsgBox to show the value to me sometimes it is NULL or empty and sometimes it is the actual value that was removed from the combo box.
Example:
(1) combo box has the value "abc"
(2) I backspace over the "abc" so that the combo box is showing ""
(3) I...
I have a combo box -- call it Combo1. If I backspace over the text in the box until there is nothing and hit Enter the Click event procedure correctly sees Combo1.Value as set to "" (nothing). However, if I do the same and then change focus to another control then Combo1.Value is...
apparently you can use:
txtboxname.OnExit=""
to turn it off, and
txtboxname.OnExit="[Event Procedure]"
to turn the event procedure back on.
you may want to change the locked property. If it is locked the user cannot edit it. And locked fields are not grayed out. I find the fore and back colors work when enabled... seems like I lose control of the color when it is not enabled.
I want to disable events such as Exit or Click while other event procedures are running. Basically in one even procedure I am updating information in the text boxes. When the user changes the data in the text box I want to run an event procedure, but when I set focus to them or change their...
Let me clarify. I want the local user to take control of the entire table. The user will (1) insert a record, and (2) query the table immediately in order to get the autonumber just inserted. Once the autonumber is determined the table should be opened up to all users again.
I tried doing...
I want to lock all records in a table only for a small point in time during a particular event procedure. The user enters text in a text box, and I want to insert it in the table and requery the table instantly in order to find out what autonumber was assigned to that new record. If I have...
Solution...
track the last keystroke with the keydown event (don't know exactly why but keypress doesn't work). When retrieving the value from the combo box... if the value is null test to see if the last keystroke was ENTER. If it was ENTER then the user put nothing in the text box and hit...
A user can definitely "type" a NULL. The text box part of the combo comes up populated with the current value of the field in the database. The user backspaces over that field and hits enter. Or if the text part of the combo is already empty and the user positions on the box and...
In a combo box is there a way to distinguish between a user typing in a null value and pressing enter, versus clicking on a list entry that is bound to a NULL value? I thought the ENTER versus CLICK events would distinguish these -- but apparently not.
Details: I have a combo box for a list...
Using concatenation as described above does not work. I happened to run across a solution completely by accident though. Using "New. . ." works whereas "New..." does not. The spaces take care of the problem and it doesn't appear to be spaced out on the screen. While I do...
I have created a combo box that has "New..." as one of the list items. I want this so that when the user selects "New..." a different form will pop up to gather the appropriate information pertaining to the new entry. I have found that while I can get "New..." to...
The variable names here are not the actual names... I just made numbers so that things would be blocked together. As for the if (not ...bof OR ...eof) -- you're logic works well for putting the loop inside and that would be a different style of doing it. My way is just the inverse of yours...
Below is a code segment from one of my forms. I have used this same logic elsewhere and it works fine. This is the only place I think I've done it with 2 recordsets open at the same time. The second loop (on Delete1) only executes once - even when there are three records in the recordset. I...
Opps... the answer is because there is a NULL in the set of values returned. Still seems odd that this would happen, but if I add "and field2 is not null" to the subquery it works.
What a silly thing to do... answer your own question almost immediately! IT just happened that way.
I have written a rather simple query. It is:
select field1 from table1
where field1 not in (select field2 from table2);
Note that field 2 is the foreign key to field1. The query is a little more complex than this, but I can reduce it to this and the same problem results.
This query returns...
Let me reply to my own question... DAO does have a BOF property as well (I missed it before). As a result my preference if:
if (not abc.BOF)or (not abc.EOF) then
abc.movefirst
end if
I also prefer to do the move and not trust the record to come initialized correctly for me. But anyone...
I am trying to find a good way to deal with an empty record set. I was using a DAO recordset, but when it is empty a MoveFirst does not work. It seems that issuing a MoveFirst would be safer than trusting that the pointer is initialized at the top of my recordset. I noticed that in ADO there...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.