Search results

  1. S

    On database open check field for blanks and extract last 4 digits from other field?

    Beautiful, That should work nicely. I'll do the Autoexec first and see if that works, I'll call the sub from my Private Sub Form_Activate() only if the autoexec doesn't work, as the form might be opened and closed a few times during the course of the day, and I'd rather not bog things down on...
  2. S

    On database open check field for blanks and extract last 4 digits from other field?

    Awesome, that solves the looping issue, I'll use the query designer to hunt out the records that are wrong, but I still don't know how to make it run silently in the background on startup. This needs to update automatically without user input, but I only need it to run once per session, I...
  3. S

    On database open check field for blanks and extract last 4 digits from other field?

    Reading through it again, the problem is not clear. I need the field "Last4SSno" to be the last 4 digits of the field "SSno" for every record in the database (2300 records as of this morning). I have a rough idea of what I need it to do, I just need to figure out the first chunk: Private Sub...
  4. S

    On database open check field for blanks and extract last 4 digits from other field?

    Ok, new question. I want to make the database (a simple table) loop through every record in the field "Last4SSno" and extract the last 4 digits from "SSno" if the "Last4SSno" field is blank, or if the 4 digits in Last4SSno does not match the last 4 digits of "SSno". I have google searched for...
  5. S

    Hey theoretical question for you guys

    Sounds to me like you could create a single table with columns for each of the myriad blank spaces in each of the forms, then recreate each of the ?2? forms you are using, point all the boxes on each form to whatever column they would need, then code the backend with a doCMD.RunSQL Update to...
  6. S

    Syntax error, what am I missing?

    I'm not seeing any spaces inside the quotes, they are all =space'IN' or =space"IN"... might be the forums lol My work day is over, I'll check back in the forums next Tuesday, have a great weekend, and thanks again!
  7. S

    Syntax error, what am I missing?

    EDIT : RE:previous post, It stopped doing it as soon as I plugged Me.Refresh into the end code, I think it had something to do with the table not updating. I clicked on the table initially to see why there had been no changes, then the changes showed up and that's when it spit the error... the...
  8. S

    Syntax error, what am I missing?

    So this should work then : Dim strSQL As String DoCmd.SetWarnings False If Me.txtLocation = "IN" And Me.txtRecordType = "M" Then strSQL = "UPDATE MedicalRecords SET MedStatus= 'IN', " & _ "MedOut='', " & _ "MedDue='', " & _ "Notes='" & Me.TxtNotes & "', " & _...
  9. S

    Syntax error, what am I missing?

    SSno is a 9 digit number string. It's a plain text text box on the form, a number in the table. Working on forcing the txtSSno value to be a number now. Here's the code now: Dim strSQL As String DoCmd.SetWarnings False If Me.txtLocation = "IN" And Me.txtRecordType = "M" Then...
  10. S

    Syntax error, what am I missing?

    Ok, changed Memo over to Notes, changed field to match and form field to txtNotes. Also tried various combinations of apostrophes and quotes to see if I could make it work, this is the code as it stands now, still giving me a syntax error: Dim strSQL As String DoCmd.SetWarnings False...
  11. S

    Syntax error, what am I missing?

    I know it's something simple like having an apostrophe instead of a quote or something similar, but I am missing it. Every extra pair of eyes helps, we're playing "Where's Waldo" with the error in the code! DoCmd.SetWarnings False If Me.txtLocation = "IN" And Me.txtRecordType = "M" Then...
  12. S

    .Open command unable to pull data from current table

    Currentproject.Connection worked fine, the problem lied in my use of " versus '. Thank you though :)
  13. S

    .Open command unable to pull data from current table

    It is a .mdb file. Edit: here is the line that works: rsTemp.Open "SELECT * FROM MedicalRecords WHERE Ssno = ' & Me.txtSSno & '", CurrentProject.Connection, adOpenDynamic, adLockOptimistic, adCmdText Thanks for the help everyone, I'll be back lol
  14. S

    .Open command unable to pull data from current table

    Hi Bob, This is a special case scenario, as this is a medical records tracker for the National Guard units of the state I am in. To reply in sequence: 1) See points 2-4 :D 2) Database is encrypted and stored in a controlled sector of the server; which itself requires a CAC access card to get...
  15. S

    .Open command unable to pull data from current table

    Sitting like this, it still gives me that 2147217913 Error. I stepped through it, and the error is definitely coming from the rstemp line... is the (adOpenDynamic, adLockOptimistic, adCmdText) stuff possibly an issue? Set rsTemp = New ADODB.Recordset rsTemp.Open "SELECT * FROM MedicalRecords...
  16. S

    .Open command unable to pull data from current table

    Holy hell, you're right! ...I need coffee. The problem appears to lie in the rstemp.Open "Select..." line of code. It gives me an error -2147217913. I have no idea what that error means, nor do i know exactly where the problem sits in that line of code. I use a handheld scanner to scan a...
  17. S

    SEP Time & Date control error

    The snapshots have bank account info on them, unless those are fake, i'd remove and blank out pronto!
  18. S

    Help stoping code from clearing a box

    If Combobox3.Value = "Yes" Then Me.Textbox22.Value = Textbox30.Value Else Me.Textbox22.Value = Textbox22.Value End If This might work?
  19. S

    .Open command unable to pull data from current table

    Hello, geniuses of Access. I am trying to teach myself Access VBA coding to rework a tracker database that has been destroyed over the past year. The database consists of a single table containing some 2200 records with the following columns: LastName, FirstName, MI, Ssno, MOB, Med Status, Med...
Back
Top Bottom