hello this is my 1st post in this forum i need help:hello, how are you and what does the title means?
the value is not insert into table (t_rec) until I click on the listbox emailztxtyou can also add Code the the Combo's AfterUpdate event:
private sub nom_mainCBO_AfterUpdate()
currentdb.execute "insert into t_rec (email) select '" & me.emailztxt.itemdata(0) & "'"
end sub
the value is not insert into table (t_rec) until I click on the listbox emailztxt
i try a method to select item but is not working
code :
Private Sub nom_mainCBO_afterUpdate()
Me.emailztxt.Requery
Me.emailztxt.Selected(0) = True
CurrentDb.Execute "insert into t_rec (email) select '" & Me.emailztxt.ItemData(0) & "'"
End Sub
for information i want to make automatique insertion to send an Email with boutn SendBtn to get the email item of the list box emailztxt .
code :
Private Sub SendBtn_Click()
Dim olapp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Dim eTo, ccTo, eSubject, ebody As String
eTo =
If IsNull(eTo) Then eTo = ""
ccTo = ""
eSubject = ""
ebody = ""
Set olapp = New Outlook.Application
Set olNewMail = olapp.CreateItem(olMailItem)
olNewMail.To = eTo
olNewMail.CC = ccTo
olNewMail.Subject = eSubject
olNewMail.Body = ebody
olNewMail.Display
End Sub
the value is not insert into table (t_rec) until I click on the listbox emailztxt
i try a method to select item but is not working
code :
Private Sub nom_mainCBO_afterUpdate()
Me.emailztxt.Requery
Me.emailztxt.Selected(0) = True
CurrentDb.Execute "insert into t_rec (email) select '" & Me.emailztxt.ItemData(0) & "'"
End Sub
for information i want to make automatique insertion to send an Email with boutn SendBtn to get the email item of the list box emailztxt .
code :
Private Sub SendBtn_Click()
Dim olapp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Dim eTo, ccTo, eSubject, ebody As String
eTo =
If IsNull(eTo) Then eTo = ""
ccTo = ""
eSubject = ""
ebody = ""
Set olapp = New Outlook.Application
Set olNewMail = olapp.CreateItem(olMailItem)
olNewMail.To = eTo
olNewMail.CC = ccTo
olNewMail.Subject = eSubject
olNewMail.Body = ebody
olNewMail.Display
End Sub
admincan you upload your db?
or put in onedrive/google drive and give me the Shared Link?
Perfecthere check and test.
see also the code on each combobox.
You do not say what error you are getting?please what is the error in this code :
Private Sub srvCBO_afterupdate()
Me.email_txtBox.Requery
If Len(Me.srvCBO & "") <> 0 Then
Me.email_txtBox = DLookup("Email_Exp", "t_natexp", "service_con = '" & Me.srvCBO) & ""
Me.email_txtBox = ""
End If
End Sub
yes problme in else if statementI think an Else is missing. If the length of srvCBO not 0 you fill email and make it empty right away. Put an Else between those two lines.
I don not understand the sense of adding "" to srvCBO.
yes the problem in the else statementYou do not say what error you are getting?
However you set email_txtBox with a DLookup and then immediately clear it?