i have created a combo box that when the user enters in a zip code it give the total number of records that meet that criteria. i also have a text box that i would like the user to enter in the x number to append to a table. i am giving you my code for the combo box which should help you. How do i take input from the user and update a table?
Option Compare Database
Option Explicit
Private Sub zip_code_AfterUpdate()
End Sub
Private Sub zip_code_1_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Send_Click()
On Error GoTo Err_Send_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "an_sent"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acTable, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Exit_Send_Click:
Exit Sub
Err_Send_Click:
MsgBox Err.Description
Resume Exit_Send_Click
End Sub
Private Sub Combo101_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo114_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo114_Enter()
End Sub
Private Sub Combo118_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo122_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo80_AfterUpdate()
End Sub
Private Sub Combo80_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo80_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub
Private Sub Combo84_BeforeUpdate(Cancel As Integer)
End Sub
Option Compare Database
Option Explicit
Private Sub zip_code_AfterUpdate()
End Sub
Private Sub zip_code_1_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Send_Click()
On Error GoTo Err_Send_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "an_sent"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acTable, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Exit_Send_Click:
Exit Sub
Err_Send_Click:
MsgBox Err.Description
Resume Exit_Send_Click
End Sub
Private Sub Combo101_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo114_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo114_Enter()
End Sub
Private Sub Combo118_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo122_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo80_AfterUpdate()
End Sub
Private Sub Combo80_BeforeUpdate(Cancel As Integer)
End Sub
Private Sub Combo80_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub
Private Sub Combo84_BeforeUpdate(Cancel As Integer)
End Sub