Answer Questions
Teymur Hajiyev Problems with OpenRecordset outputting text in Access Database
Hi - When I run my VBA code to output text against IDs into fields in my Access DB, I get into an infinite loop without results or errors. How would I teak my code, specifically the subrst.Fields.Count syntax in a Do While statement, to output text results in my DB. I have attached the code to see if someone can spot my problem. Private Sub Form_Current() Dim subrst As Recordset Dim db As Database Dim rst As DAO.Recordset Dim strPhase As String Dim dtDate As Date Dim strClassification As String Dim strFailureType As String Dim ID As String Dim ID_No As String Set db = CurrentDb Set rst = db.OpenRecordset("Select*FROM qryScores WHERE id_NO=[Forms]![frmMODS_TorpedoScores].[ID_NO]") dtDate = rst.Fields("Date") ...Show All
gerbenvl personalized command bar disappears when minimizing excel
This is my first message in this forum, so please be patient. I have programmed a makro for an excel workbook. one part of this makro creates a command bar. when the excel workbook is started i make all the regular command bars disappear, only mine is left. Works wonderful. Well, i have put a button into my command bar to minimize the application. However, when i restore the workbook again from the windows taskbar, my commandbar is vanished, and the normal command bars (like standard and format and also the formula bar) are suddenly there. The command bar is still there but not enabled/visible. The problem exists on many computers and also on differnet excel versions i tried (97, 2000, xp) I do not know if that is a bug or not. Now is it p ...Show All
Madhur Bhardwaj My mini Utility_Move class, please have some suggestions.
Hello guys, I made a class called Utility_Move. Please give me some suggestions. If there is a better, cleaner, more performance way than mine, please tell me, thank you. 'Motive: Sometimes it is eaiser to debug when you use ActiveCell as current data record or parameter. ' When the macro stopped by exception or stop sign, you can determine the running progress by ActiveCell. ' And it is easier to say Up(5) instead of offset the row index, for me at least. 'Summary: The Utility_Move class introduce 3 sets of functions. 'First set, Up-Down-Right-Left simulate the key stroke of arrow keys. ' Additionally, Steps parameter allows you to repeat number of seps to that direction. ' Negative st ...Show All
programmer127 Need to detect whether Access subform currently shows vertical scrollbar (urgent??!)
Using MS Access 2K, XP Pro I need to detect whether an Access subform is currently displaying a vertical scrollbar. I've tried many approaches but to date - no joy. Must surely be able to do this using an API call - but can't seem to get it working. I'd really appreciate any help with this! thanks in advance Hey man, I can think of any situtation when knowing this would be useful but hey that doesn't mean there isn't one. The only thing I'd recommend is base it on the amount of records that are displayed. The control will have a certain height and each line will take up a certain amount of space so if you do a bit of maths then you should be able to determine the likelih ...Show All
eginde How to retrive the text value from the xml tag enclosure url?
I have some problems with print the XML enclosure tag, this is my code, please provide a complete sample.... Set Nodes = objXML.selectNodes("//item") For Each Node In Nodes Response.Write Node.selectSingleNode("title").Text Response.write Node.selectSingleNode("enclosure").Text next XML sample -------------XML--------------------------------------- <item> <title>My little title</title> <link> http://www.whatever.com</link> <description>my little description</description> <enclosure url=" http://www.whatever.com/images/56308tiny.jpg " length="3000" type="image/jpg" /> </item> Hi dingdong, Tex ...Show All
drajwani Method 'OnAction' of object 'CommandBarButton' Failed
One of the users is getting the following error message: Runtime Error '2147467259 (80004005)': Method 'OnAction' of object 'CommandBarButton' Failed. The following is the code: Private Sub Workbook_Open() Dim MyCommandBar As CommandBar Dim MyControl As CommandBarButton For Each MyCommandBar In Application.CommandBars If MyCommandBar.Visible = True Then If MyCommandBar.Name = "Worksheet Menu Bar" Then Set MyControl = MyCommandBar.Controls.Add(msoControlButton, , , , True) MyControl.Caption = "GFS BW Printing" MyControl.Style = msoButtonCaption MyControl.Visible = True MyControl.OnAction = "GFS_Printing_Macro" End If ...Show All
AndyMc Form Names Not Visible In Title Bar-Access Runtime
I have created an application for a local telco, split into a front and back end. Some users have the full version of Access installed, others are using Access 2003 Runtime. All the users who have the full version of Access installed can see the form names on each of the buttons on the task bar that correspond to them when the forms are open. None of the Access 2003 Runtime users can see the form names on the buttons. The buttons appear on the taskbar for the Access 2003 Runtime users, but they are blank-they do not have the form names on them (inconvenient for ppl who must have multiple applications open to do their job). Can someone tell me if this is normal behavior or is something causing this to happen. ...Show All
netpicker9 Sum of hours for month following submission date only
Hi - im a little stuck on one part of my system. Thanks to the help of others i can now get users to enter a submission date into the activity system that then restricts them from editing any activities prior to that submission date ( a field called 'datelastsubmitted'). However on that end of month submission form i also need to show the sum of all hours for the month that is to be submitted next. By this i mean that if a user last submitted on the 31/10/2006 then the next time he comes to submit he will see the sum total of activity hours he /she has entered for November 2006 i.e 01/11/2006 to 30/11/2006. The field is called 'availablehours' and the code i have written does sum up the availablehours for the user but im unsure as to how t ...Show All
kunal.pandya If... GoTo
Hi, I struggle on this one. I want to search a workbook for a worksheet named 'STAT'. If that is found the function shall GoTo 'Start:' else I want it to GoTo 'Manual_Pick:'. Here's the code as I wrote it. It works fine when there is a worksheet 'START' but if there's not it doesn't GoTo Manual_Pick. Dim ws1 As Worksheet For Each ws1 In Worksheets If ws1.Name = "STAT" Then Worksheets("STAT").Select If ws1.Name = "STAT" Then GoTo Start If ws1.Name <> "STAT" Then GoTo Manual_Pick End If Next Star: ...some code... Manual_Pick: ...some code... Any ideas Best regards \Jonas Not stupid at all. Everybody makes mistakes, and it's often much ...Show All
VThornheart Sum of hours using select statement & VBA
Hi - ok here is my question: I have an activity recording form that records hours logged against a company. I have added a field called 'sumactivityhours' to the table and the form. what i would like to do is when a user selects a company from the drop down list (thanks derek and duck thing for your fantastic help with that problem) it automatically populates the 'sumactivityhours' field with the total number of hours worked thus far with that company so that the user can see the total hours and then writes that information into the 'sumactivityhours' field in the table. as i gradually begin to learn a little more about VBA im guessing that i should create an on exit event on the companyname combo box that re ...Show All
Jeremy Jarrell How do I call for all installed printers....
Hey, How do I, with vba code, call for all installed printers in my computer and then display them in a ListBox Best Regards Cathrine I don't think it is possible to find out all installed printers:(. You can get only the active printer using Application.ActivePrinter property. To add items to a ListBox in Excel, you do something like this: Sub addlistbox() Dim lb As ListBox Set lb = Sheet1.ListBoxes.Add(10, 10, 100, 100) lb.AddItem (Application.ActivePrinter) lb.AddItem ("more text") lb.AddItem ("more text2") End Sub Hi, In Excel you can make use of the built in dialog. Application.Dialogs(xlDialogPrinterSetup).Show Which application ar ...Show All
is98 iexplore.exe - Application Error
I get the following error message when I close my internet explorer. The instruction at "0x62304320" referenced memory at "0x62304320", The memory could not be "read". Click on OK to terminate that program. Any ideas what is causing this I don't use the Yahoo tool bar and I get a similar message when I close Ie 6.. "The instruction at "0x02653812" referenced memory at "0x0277bb2c". The memory could not be read. (All XP updates installed.) Hello i would like to know how to fix this problem on my computer. If there is away please let me know so i can fix it. Tracyb Hello bennett1016, You ar ...Show All
pblecha Refer to another module tag
I have a small problem that is of greate importance to me and seem to have a hard time getting any help. I have two modules. in the first module i have code that creates buttons. if a button is pressed then a sub in ANOTHER module is called. that works fine. in that sub i want to check which button has been pressed. therefore i need to look at the tag for the button. it is here that my code fails. i do not know how to do this when the button is created in another module than the sub. that is all i am asking. My code for the first module: Public Sub Create_Menu() Dim MyBar As CommandBar Dim MyPopup As CommandBarPopup Dim linjeDiagramKnapp As CommandBarButton Dim stapelDiagramKnapp As CommandBarButton 'stapeldiagramknapp Set s ...Show All
Gabi M Can you tell me why Int(1.4 * 100) = 139
Can someone help me to find solution: Int(1.3 * 100) = 130 Int(1.4 * 100) = 139 (also Int(1.38 to 1.49 * 100 ) ) Int(1.5 * 100) = 150 (VBA:Retail 6.0.874) Thanks in advace @o@ theses are some very strange behaviors. I expect CInt() to neglect any fraction values. Not only it rounded up, but it rounded up inconsistently. Thanks for point that out and the solution to it. This is something I will never expect or understand by myself. Maybe these kinds of issues are not a big deal for VBA professionals, but I consider it as a bug or ill designed function. I remember C++ simply truncate fraction values when converting to int. I like how it behaves, it is rea ...Show All
Dave Waterworth key in date and filter the data in a week
Hi all, I have question on VBA which is quite difficult for me. I need a VBA code that can filter out all data in a specific week after i type in a date, any date within that week in a textbox which i have previously created. For example i have a table of dates corresponding to number of week: Week 1 02-Jan-2006 09-Jan-2006 Week 2 09-Jan-2006 16-Jan-2006 Week 3 16-Jan-2006 23-Jan-2006 Week 4 23-Jan-2006 30-Jan-2006 Week 5 30-Jan-2006 06-Feb-2006 Week 6 06-Feb-2006 13-Feb-2006 Week 7 13-Feb-2006 20-Feb-2006 Week 8 20-Feb-2006 27-Feb-2006 Week 9 27-Feb-2006 06-Mar-2006 and ...Show All
