New topic: Popup menu displays large gray patch above SQL return.
<http://forums.realsoftware.com/viewtopic.php?t=27983> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message McDian Post subject: Popup menu displays large gray patch above SQL return.Posted: Mon May 11, 2009 11:35 am Joined: Fri Sep 14, 2007 5:00 pm Posts: 175 Okay I know how to get data from a database and populate a popup menu. But what has me intrigued is how to remove the large space of gray above the returned value. There are no blank records in the tables that are being used to populate the popup menus. Code:Dim recSet As RecordSet ' Test to make sure I am connected to the database. If (dbMmacs.Connect) = True Then recSet = dbMmacs.SQLSelect("SELECT vendId FROM tblVendors ORDER BY vendId ASC") Me.DeleteAllRows ' Clear any remaining rows first If recSet = Nil Then // Test for an empty record set. Beep MsgBox "Record Set Error: " + str(dbMmacs.ErrorCode) + EndOfLine + EndOfLine +dbMmacs.ErrorMessage _ + EndOfLine + EndOfLine + "Error generated from: frmMeters.popVendId.Open" Exit Else While NOT recSet.EOF Me.AddRow recSet.Field("vendId").StringValue ' Add each new record to the popup menu recSet.MoveNext Wend recSet.Close End If Else If dbMmacs.Error Then // Testing for issues in the DB tissues! Beep MsgBox "Database Error: " + str(dbMmacs.ErrorCode) + EndOfLine + EndOfLine +dbMmacs.ErrorMessage Exit End If MsgBox "I do not believe it is connected! " + str(dbMmacs.ErrorCode) + EndOfLine + EndOfLine + dbMmacs.ErrorMessage End If This happens with all my popup menus. Now if I scroll down until the gray area is no longer visible THEN scroll back up it's gone and the first record shows with no large patch of gray over the top of it. I don't understand why this is happening and I am not sure how to get rid of it. And actually this ties into another question on the popup menus. In the Property/Value pane at the bottom there is an area called Database Binding. How do I get those to work with a popup menu so I don't have to write code like above? Can it be done? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
