Avatar of jbakestull
jbakestull

asked on 

Access Form Extract a table value based on form field

I"m just having a hard time trying to extract a value from a table via SQL.  

cbotest is a combo box field located on frmUSHS.

After the updated event if the client (intCSPIdentifier from tblVulnerabilityIndex = cbotest) and has a score (intTotalScore from tblVulnerabilityIndex), I would to populate the results on a text field call in USHS from called "txtVulscore".

Any help would be grateful. My head is starting to hurt trying to find a syntax sample that I can use.

Thanks


Table
tblVulnerabilityIndex
intCSPIdentifier
intTotalScore

Form
frmUSHS
cbotest
txtVulscore


Dim rs As Recordset
    Dim strSQL As String
    strSQL = “select [intTotalScore] from tblVulnerabilityIndex where intCSPIdentifier=' & Me.cbotest & "    Set rs = CurrentDb.OpenRecordset(strSQL)
    If Not rs.EOF Then
     
    End If
Microsoft Access

Avatar of undefined
Last Comment
jbakestull
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jbakestull
jbakestull

ASKER

Thank you. You made my day.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo