mare
Registered User.
- Local time
- Today, 01:37
- Joined
- Jan 20, 2003
- Messages
- 16
Hello:
I have a database in which I keep track of associates. One of the fields is for their business position (i.e., buyer). This field is a combo box.
I ‘ve created a form so that when add new associates, I can click on the down arrow at the Business Position field and select one of the choices. I have also got an event going in case a new associate with a new (not in the list) position needs to be added. when I type in the new business position, a dialog box appears if I really want to add it. Here’s the VBA to add the new business position
BusPosition NotInList
Private Sub BusPosition_NotInList(NewData As String, Response As Integer)
On Error GoTo BusPosition_NotInList_Err
'Add a new record to the BusPositionTBL table
'and requery the BusPosition combo box
Dim NewPosition As Integer, MsgTitle As String, MsgDialog As Integer
Const MB_YESNO = 4
Const MB_ICONEXCLAMATION = 48
Const MB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7
'make sure the user really wants to add it
MsgTitle = "Business Position is not in the list"
MsgDialog = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON1
NewPosition = MsgBox("Do you want to add this business position?", MsgDialog, MsgTitle)
If NewPosition = IDNO Then
Response = DATA_ERRCONTINUE
Else
DoCmd.OpenForm "BusPositionFRM", acNormal, , , acAdd, acDialog
Response = DATA_ERRADDED
End If
BusPosition_Exit:
Exit Sub
BusPosition_NotInList_Err:
MsgBox Err.Description
Resume BusPosition_Exit
End Sub
The new position is added to the BusPosition table (which is what it is supposed to do). When I bring up the associate (to edit some information), everything is where it should be
The problem:
When I run a report on the associates, where there should be their Business Position title, I get the Business Position ID number. I just want the titles.
I have tried all kinds of things to try to reason this out and fix it, but nothing works.
I have gone into the properties for the BusPosition field:
This has got me going loopy. Any help is greatly appreciated.
I have a database in which I keep track of associates. One of the fields is for their business position (i.e., buyer). This field is a combo box.
I ‘ve created a form so that when add new associates, I can click on the down arrow at the Business Position field and select one of the choices. I have also got an event going in case a new associate with a new (not in the list) position needs to be added. when I type in the new business position, a dialog box appears if I really want to add it. Here’s the VBA to add the new business position
BusPosition NotInList
Private Sub BusPosition_NotInList(NewData As String, Response As Integer)
On Error GoTo BusPosition_NotInList_Err
'Add a new record to the BusPositionTBL table
'and requery the BusPosition combo box
Dim NewPosition As Integer, MsgTitle As String, MsgDialog As Integer
Const MB_YESNO = 4
Const MB_ICONEXCLAMATION = 48
Const MB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7
'make sure the user really wants to add it
MsgTitle = "Business Position is not in the list"
MsgDialog = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON1
NewPosition = MsgBox("Do you want to add this business position?", MsgDialog, MsgTitle)
If NewPosition = IDNO Then
Response = DATA_ERRCONTINUE
Else
DoCmd.OpenForm "BusPositionFRM", acNormal, , , acAdd, acDialog
Response = DATA_ERRADDED
End If
BusPosition_Exit:
Exit Sub
BusPosition_NotInList_Err:
MsgBox Err.Description
Resume BusPosition_Exit
End Sub
The new position is added to the BusPosition table (which is what it is supposed to do). When I bring up the associate (to edit some information), everything is where it should be
The problem:
When I run a report on the associates, where there should be their Business Position title, I get the Business Position ID number. I just want the titles.
I have tried all kinds of things to try to reason this out and fix it, but nothing works.
I have gone into the properties for the BusPosition field:
This has got me going loopy. Any help is greatly appreciated.