Bizarre Behavior With Listview StartLabelEdit And Multiselecting
Aug 14, 2007
This is driving me crazy! I have some code that has a list of items in a listview. When I right click it shows a pop-up right click menu with a macro. Then I select an item in the list that says Rename. After ensuring a single element is selected the StartLabelEdit method is called on my list view. Then I can begin editing. Normally this works fine. However, if I first double click a list item. Then I enter my double click list view event handler and from there I open a form. Later if I close that form and then try right-clicking and selecting rename. This time after StartLabelEdit is called, the BeforeLabelEdit event is never called. The whole selected line blinks momentarily and then wherever my cursor is at that moment every item between it and the originally selected item becomes selected. If I move my mouse around the selection changes to be between the originally selected item and the one my mouse is over as it moves. It's as though I had clicked the left mouse button down but didn't let go of it and then started moving the mouse around. If I left click and release again it seems to get out of this mode, but I am still not able to ever manually invoke the StartLabelEdit method after this point. If I close the form and re-open it, it works fine. (I've tried calling refresh on the list view but this had no effect.)
Here's the really weird part. If instead of double-clicking to open a form, I right click and select a menu option to call the exact samed double click event method. Everything works fine as you would expect. Then I tried another test. I made the double click method call another method to open the form. When I did this and tried the same alternate way of opening a form, it did not work and the same original error occurred again. This weird behavior is bizarre and I have no real idea how to troubleshoot it any further.
:mad:
Has anyone ever seen or heard of something like this where StartLabelEdit goes haywire? Please help me if you can.
Thanks...
-Will
View Replies
ADVERTISEMENT
May 27, 2005
Hi All!
This to me seems absolutely bizzare! It happens in both Access 97 and Access 2003 so I know its not a version issue.
I have a Access database with a link table to a spreadsheet. I have written a query which displays data from this link table which filters out blank rows, the spreadsheet header etc and just leaves me with the data I want to import which first time I ran it was perfect and exactly what I wanted. However, it turns out that this query only works intermittently. If I run it subsequently I get a "numeric field overflow" error message. But if I go into the query design and resave it without making any changes it will then run again!!! Running it thereafter will bring back up the error message until I resave it again!!! Why is this? Any ideas anyone? I dont want to have to keep resaving it to run it.
Actually thinking about it unless I could of course resave it using code???
Regards,
Dalien51
View 3 Replies
View Related
Mar 23, 2005
I'm having trouble finding any useful documentation on the ListView control. I'm using Access 97. If you know of a good source for this, please reply.
I have two specific questions, too:
(1) Is there a way to access all the selected items in a multi-select ListView without having to loop through every single item? (Something similar to the Access ListBox control's ItemsSelected property would be nice....)
(2) Is there a way to deselect all items without having to deselect each one individually?
View 3 Replies
View Related
May 11, 2005
Hi:
I need to have a listview (or similar control) with several of the columns being a dropdown list. Does anybody know how I can do this? I have done this in Visual Basic 6.0 but not V.B.A.
View 1 Replies
View Related
Sep 25, 2005
Hi,
I have added a listview on a form from ActiveX control. I am not able to add items to it. I do not get the ListITems.additem when I press dot after listview control name. Please help
View 1 Replies
View Related
Oct 4, 2007
Hi,
First time on here, so hello all!
I have a very strange request from a client who wants to do something simple that they can't because of poor database design (not mine!) . I can't think of an elegant solution so I'm wondering if anyone on here can?
They have multiple tables containing address information, for example they have one containing information about certain buildings. They can use the softcopy of the database to retrieve information about the building but for backup they now need a hardcopy.
Now part of the building information includes the alternative names for buildings (for example "City Museum" and "Art Muesum" might be different names for teh same building). The hard copy needs to have a line entry for both names (proper and alternative) and this is where the difficulty lies.
Using a simple example the table might be:
colour fruit
red apple
orange
yellow banana
The output I would need in the report is therefore:
Red (Apple)
Apple (Red)
Orange ()
Yellow (banana)
Banana (Yellow)
Now I may be being dense but I can't see how I can do this! All help very gratefully recieved :)
View 1 Replies
View Related
May 25, 2005
Greetings all,
I'll try to make this as simple as possible, but please ask for clarification if I'm unclear:
*I have one pass-through query to Informix that pulls all available class schedule information.
*I have another local query that uses information in a local table to restrict that query to a particular year and semester, chosen by the user.
*I have a function TimeConv that takes the numeric value used in the Informix db to store times (e.g., "1300") and converts it into a real time value (e.g., "1:00:00 PM").
The problem is this:
While the TimeConv function by itself always works in the local query, if I try to perform any comparisons on it, I get the error message "Invalid Use of Null". There are no null records in the restricted data. If I put the semester and year restriction directly into the pass-through query instead of the local query, the comparison operations work just fine. (But it's important that the user be able to change this without editing the SQL directly.) Only when that restriction is in the local query do I get the error message.
I've tried several ways of filtering out Null values from both queries, and it doesn't seem to make any difference. If I Nz() the fields before passing them to the TimeConv function, I instead get the error "Invalid procedure or argument call", I believe because it insists on reading "0000" as "0", which is too few digits for the function to work.
I get the same results if I try to run it through yet a third (local) query.
Relevant code and SQL below. I'm really stumped on this one. Thanks in advance for any suggestions!
Pass-through query (qryPassJoin1):
SELECT t3.days, t3.room, t2.crs_no, t3.bldg, t3.mtg_no, t1.sec_no, t3.beg_date,
t3.end_date, t3.beg_tm, t3.end_tm, t9.sex, t5.abbr_name, t1.yr, t1.sess
FROM informix.sec_rec t1, informix.crs_rec t2, informix.acad_cal_rec t7,
outer (informix.secmtg_rec t8, outer informix.mtg_rec t3), outer
informix.dept_table t6, outer informix.schd_comment_rec t4, outer
(informix.fac_rec t5, outer informix.profile_rec t9)
WHERE t1.cat="UG93" and t1.crs_no=t2.crs_no and t1.cat=t2.cat and
t1.crs_no=t8.crs_no and t1.cat=t8.cat and t1.yr=t8.yr and t1.sess=t8.sess and
t1.sec_no=t8.sec_no and t8.mtg_no=t3.mtg_no and t1.crs_no=t4.crs_no and t1.cat=t4.cat
and t1.yr=t4.yr and t1.sess=t4.sess and t1.sec_no=t4.sec_no and t1.fac_id=t5.id
and t2.crs_no NOT IN
("JFESSA", "FRESSA", "SOESSA", "JRESSA", "MAESSA", "MAORAL", "DEPO", "DEPO2", "SRESSA", "SRORAL")
and t2.dept=t6.dept and t7.prog=t2.prog and t7.sess=t1.sess and t7.yr=t1.yr
and t5.id=t9.id;
If I add this criteria, functionally equivalent to the first WHERE statement in the local query below, it all works fine:
AND t1.yr=2005 AND t1.sess="SU"
Local Query (qryCatalog):
SELECT qpj1.days, qpj1.room, qpj1.crs_no, qpj1.bldg, qpj1.mtg_no, qpj1.sec_no,
qpj1.beg_date, qpj1.end_date, qpj1.beg_tm, qpj1.end_tm, qpj1.sex,
qpj1.abbr_name, DateDiff('h',TimeConv([beg_tm]),TimeConv([end_tm])) AS NoLongLab
FROM qryPassJoin1 AS qpj1, tblSettings
WHERE (((qpj1.beg_tm)>0) AND ((CInt([yr]))=CInt([tblSettings].[catyear])) AND
((qpj1.sess)=[tblsettings].[catsess]));
The comparison criterion I would like to add here is:
AND ((DateDiff('h',TimeConv([beg_tm]),TimeConv([end_tm])))<=2)
Function TimeConv:
Public Function timeconv(numtime As Variant) As Date
timeconv = CDate(Left([numtime], (Len([numtime]) - 2)) & ":" & Right([numtime], 2))
End Function
View 3 Replies
View Related
Sep 13, 2006
hi
Good Day!
anybody here who can help me on how to fill in data in the listview object in MS Access programming, I just want to know in filling up data in each rows and column , as what I know in Vb6.0 its different...
Thanks
View 2 Replies
View Related
Jan 30, 2006
I have a form that opened perfectly before from a click event with a standard link criteria lookup function, and...it's suddenly stopped working!
Before the form opens I get a small query box asking: Forms!support!fault ref
In other words it's asking me to enter the value it should've got from the link criteria lookup. Whatever I enter, the form then loads with the correct record.
Is there a known Access corruption issue, or does anyone have any ideas?
View 1 Replies
View Related
Jun 27, 2005
Hello all,
I finally got TreeView to work, by downloading the example database from this (http://www.access-programmers.co.uk/forums/showthread.php?t=80805&highlight=treeview) thread. I haven't had as much luck with ListView, though. Does anyone have a database they could post that has a working listview? I'd greatly appreciate it!!
Thanks,
Eric
View 1 Replies
View Related
Jan 26, 2005
Hi all,
Been having this problem for a long time.
Everytime my function is being called, a new tuple gets inserted into Table "Stats" containing the below mentioned data.
sSQL = "SELECT * FROM Stats WHERE UserID = '"&sUserID&"'"
rs.Open sSQL,,,adCmdTable
'Save the data
rs.AddNew
rs("JaID") = lIdJa
rs("JsID") = lIdJs
rs("LanID") = lIdLan
rs("ResID") = lIdRes
rs("WsID") = lIdWs
rs("Date") = Date
rs("Time") = Time
rs("IP") = sIP
rs("UserID") = sUserID
rs.Update
Some of the weird data i got from Table "Stats"
1/25/2005 12:45:59 aaaa bbbb cccc dddd ..... row1
1/25/2005 12:46:24 aaaa bbbb cccc dddd ..... row2
1/25/2005 12:46:29 aaaa bbbb cccc dddd ..... row3
1/25/2005 12:46:35 aaaa bbbb cccc dddd ..... row4
1/25/2005 12:46:40 aaaa bbbb cccc dddd ..... row5
1/25/2005 12:46:40 aaaa bbbb cccc dddd ..... row6
1/25/2005 12:46:40 aaaa bbbb cccc dddd ..... row7
1/25/2005 12:52:51 aaaa bbbb cccc dddd ..... row8
Each time a person click on my site, one tuple will be inserted into the Table "Stats".
Time which is one of the column of the Table "Stats" is inserted into the table each time the function is called
The puzzling thing is how is it possible for the time to be the same for row 5,6 & 7.
This happens very often and i have totally no explantion for it. I tried changing the time format, date format, however i always get this.
Please advise.
Thanks a lot
View 2 Replies
View Related
Aug 25, 2007
I built my wife a database to use for her work that has worked fine for a good while now. Just yesterday, one of the make table queries began to act peculiar. Suddenly, whenever you try to run it it gives the following error:
"The Microsoft Jet database engine has stopped the process because you and another user are attempting to change the same data at the same time."
This is on a computer at our home so obviously no one else is trying to access it. I have checked and there are no other instances of the database running (I've even rebooted to be sure). I have checked when it was shut down and didn't see a locking file associated with the database. It is a single make table query feeding directly from another table.
As I said, it was working fine for a good while. I'm out of ideas so can anyone help????:confused:
View 3 Replies
View Related
Jan 30, 2015
In a form, I have a listview control bound to a TreeView control.
By default LV considers "selected" the first item on the list even if it is not highlighted.
In Form is a command button that performs an operation on the item selected, but to prevent accidental activation requires two tests:
1) the list is not empty
Code:
If LV.ListItems.Count = 0 Then Exit Sub
2) an item is actually highlighted.
How can I make the second test?
View 3 Replies
View Related
May 30, 2006
I imported some db objects from one db to another. I worked on the db, with the imported files, to make a new db. However, while working on the db suddenly, I lost all the imported files, as they were not visible via the objects panel.
What a revolting development this was!! All that work for nothing. I reimported a Form from the other db into the one I was working on and-WOW! All the objects showed up in the Object panel as they should. I find that importing from the other db always makes the Objects visible, so the effort was not for naught.
Does anyone know why Access 2003 behaves in this ridiculous manner? It is a real pain in the a--, but can be worked around.
View 1 Replies
View Related
Mar 6, 2006
I have a form that I have added drop down combos. I want the form to open with drop-downs blank, they keep populating. Is there a setting that could do this? Thanks
View 2 Replies
View Related
Jun 9, 2006
I have a split db with the backend on a shared drive. I have two combo boxes on my form that are filled with a sql statement from two different tables - one is "manager" and one is "owner". When I open the front end on my system both combos are loaded with the correct data. Lately when I open it using one of our dedicated computers in a conference room the "managers" combo is completely empty. The "owner" one and any others are fine. I can't figure out what could be happening to make it just lose the one. Has anyone experienced this before?
Thanks,
Toni
View 1 Replies
View Related
Jul 6, 2007
I'm currently researching on how to best migrate from Access back-end to a SQL backend, and was able to find wealth of information on how well Access can play with various SQL servers, how ODBC drivers are implemented, and how JET handles queries to backend. If this helps matter, I'm considering using MySQL as a backend.
That said, there are some gaps in my research that I'm hope someone will be able to fill in for me.
1) I have couple of queries that may use Access's custom function not otherwise supported in SQL servers. If I based the query on otherwise executable query, would JET be able to pass the sub query to SQL, and get the recordset and apply the next query using custom functions without any problems?
2) In general, DAO is best when you're using JET, but ADO is best for ODBC. I'm not clear whether it's possible to use a mixture of ADO and DAO, provided I've disambiguated the library (which I already did anyway) to make even efficient use of recordset. For example, I'd use ADO to work with data from backend and once it's bought over here, switch to DAO for faster handling by JET. Is that possible *and* advisable?
3) I found lists about limitations or problems that may arise due to differences between Access and SQL, which is good to know. However, I never found any answer as whether VBA may cause problems with using SQL data. Let's say I have a form that has lot of VBA coding to handle calculations, multiple selection in listbox to be added to a junction table, dynamically changing rowsource for a combobox, whatever that is based on a query that otherwise runs fine with SQL server- will the form still work just as fine or are there going to be any surprises after migrations?
4) Somehow related, if this is supported by whatever SQL server I may use, would I be better advised to use stored procedures in place of VBA for Access forms?
Thanks for your feedback. :)
View 14 Replies
View Related
Dec 23, 2004
I'm not sure if this is the proper forum for this post. I have a database in access in which i need to mimick a trigger like behavior. As far as I know access does not support triggers. When a user updates a record I need a LastModified date field to be updated with the current date automatically.
I've seen several examples of how to accomplish this using forms, however, the users of this database do not use forms. They are editing the records by hand by opening up the table and simply typing.
Any help you can provide is greatly appreciated.
Thanks!
View 3 Replies
View Related
Aug 4, 2005
Hi all,
I use to have a field named RDI_ID, later on I decided to change the name to RDI to make things easier.
I have several macros pulling recordsets, but they stopped working, even though I have changed that field name
to RDI in the macro as well.
Curiously, they do work when I change it back to the old name, being RDI_ID. I have been looking at that field
propriety and it is named RDI. Did I miss a change somewhere?
That table has no relationship whatsoever.
Help plzz.
View 2 Replies
View Related
Aug 4, 2005
Hi all,
I use to have a field named RDI_ID, later on I decided to change the name to RDI to make things easier.
I have several macros pulling recordsets, but they stopped working, even though I have changed that field name to RDI in the macro as well.
Curiously, they do work when I change it back to the old name, being RDI_ID. I have been looking at that field propriety and it is named RDI. Did I miss a change somewhere?
That table has no relationship whatsoever.
Help plzz.
View 4 Replies
View Related
Mar 14, 2005
Not sure what to call this "phenomenon" so haven't had any luck searching for an answer.
I have a form (form1) that has a close button with code behind it. When the button is clicked, it takes a few seconds for the code to run. When form1 closes, all is well up until: There is another form (form2) that is open behind form1. When form1 closes, part of it is still visible over form2.
Hope this makes sense. Any way to solve?
View 1 Replies
View Related
Apr 5, 2005
I've never seen this before.
I have a form bound to a non-updateable query. There is an unbound combo box in the form footer.
When the form contains no records, the combo box display goes blank after you make a selection. I checked the After Update event of the combo box and the value selected is still intact but it will not display it in the actual box on the form. I've tried Me.Refresh, Me.Requery, nothing works.
If the form contains records it works just fine but often times this form may not show any records when it is first open.
Check out the attached sample DB. Can anyone explain this one?
Thanks.
View 4 Replies
View Related
Dec 29, 2005
When I open my mainform through an onClick event of a button, the form opens up with the subform on it is disabled/closed -- Just a blank white box shows in place of the subform on my mainform. Here:
http://img426.imageshack.us/img426/4672/shot29sj.th.jpg (http://img426.imageshack.us/my.php?image=shot29sj.jpg)
However, when i go through the objects window and open the mainfrom directly. I am able to enter and update data and the subform shows up and works fine. Here:
http://img420.imageshack.us/img420/5650/shot19ig.th.jpg (http://img420.imageshack.us/my.php?image=shot19ig.jpg)
This is the code attached to the onClick event on the mainMenu
Private Sub New_Project_Click()
On Error GoTo Err_New_Project_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Project Status - Full Details2"
stLinkCriteria = "[projectId]= 0"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Form_Project Status - Full Details2]![Proj ID].Enabled = False
Exit_New_Project_Click:
Exit Sub
Err_New_Project_Click:
MsgBox Err.Description
Resume Exit_New_Project_Click
End Sub
This is the record source on the mainform:
The projectInfomation table is the record source
SELECT *
FROM projectInformation;
This is the record source on the subform:
The projectStatusCommentary table is the record source
SELECT projectStatusCommentary.projStatusId, projectStatusCommentary.projectId, projectStatusCommentary.statusCommentary, projectStatusCommentary.commentaryDate
FROM projectStatusCommentary;
The link fields are:
projectInformation.projectId
projectStatusCommentary.projectId
The tables are in sybase and my application has an ODBC connection to them.
I can update any of the tables directly without issues.
I have ran the queries independently and updated tables through the query and it works fine also.
I have been pulling my hairs out on this for over 3weeks now. cos i can't seem to find what's wrong.
I am not able to attache the db cos it's very huge. But i have copied the problematic form &subform, to a new db so you may see my design, and record sources.
If you have any suggestions, ideas, or you've come across this kind of issue before, anything...please make my new Year a happy one and help :)
I would really appreciate it!
Have a happy and prosperous new year.
Yours truly,
Frustrated one
View 10 Replies
View Related
May 28, 2006
I have a form with a subform which contains a combobox in one of its fields. What's buggin me about this subform is that when I enter two records in it, successively, the first record seems to save without problem, but the second one will not allow me to select any item from the combobox. The combo displays the choices but when I select one, nothing happens and the field remains empty.Note: just now I discovered that the combobox "locked" property turns to TRUE for the succeeding record, thus the uneditability. I'm still trying to find out what made it so.
View 1 Replies
View Related
Aug 18, 2006
I have a form with a few labels that for some reason, very often will have a strange looking line above them after I am done clicking on them. I can't seem to find out why this happens. It happens on every label on this particular form.
Please take a look at the attachment for a screenshot.
I'd appreciate any advice you may have on why this happens and how to fix it.
View 5 Replies
View Related
Jan 8, 2005
I have an insert into statment that takes information out of textboxes and adds it to a different table.
Code: DoCmd.SetWarnings False If Not IsNull(Text96) Then DoCmd.RunSQL "INSERT INTO walkers (Walker, Firstname, Date, Lastname, Visits) VALUES('" & Text96 & "', '" & Firstname & "', '" & Lastname & "', '" & Date & "', " & Text98 & ");" Text96.Value = Empty Text98.Value = Empty End If
It works but when I add the Vaule of Date I get an error.
Run-time error 3134
Can anyone see any syntax errors or what im doing wrong....
Thanks
View 3 Replies
View Related