If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Change label caption based off value in table
I want to be able to allow users to change 3 category names by going
into a form and then typing in the new name. So I have labeled these three categories Misc1, Misc2, and Misc3. The problem I have is how do I access the table to find the values I need? The other form and underlying table are already setup. I just need the code to find the value "Misc1" and then the corresponding new name Any suggestions? Thanks! -Matt |
#2
|
|||
|
|||
Change label caption based off value in table
I'm a little fuzzy as to your purpose here, but assuming you only have one
record in you "Misc" table, you can use the DLookup() function without the Where clause: Private Sub Form_Load() Label1.Caption = DLookup("misc1", "MiscTable") Label2.Caption = DLookup("misc2", "MiscTable") Label3.Caption = DLookup("misc3", "MiscTable") End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200910/1 |
#3
|
|||
|
|||
Change label caption based off value in table
On Oct 15, 7:40*am, "Linq Adams via AccessMonster.com" u28780@uwe
wrote: I'm a little fuzzy as to your purpose here, but assuming you only have one record in you "Misc" table, you can use the DLookup() function without the Where clause: Private Sub Form_Load() *Label1.Caption = DLookup("misc1", "MiscTable") *Label2.Caption = DLookup("misc2", "MiscTable") *Label3.Caption = DLookup("misc3", "MiscTable") End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200910/1 Thanks Dlookup was exactly what I was looking for! |
Thread Tools | |
Display Modes | |
|
|