Search results

  1. G

    Syntax error in UPDATE Statement.

    Dim StrSQL As String Dim PartnerId As String Dim Active As String Dim EndDate As Date Active = 0 EndDate = Date PartnerId = Me.cboPartnerId.Value DoCmd.RunSQL "UPDATE PARTNER SET EndDate = #" & EndDate & "#, Active = " & Active & ", WHERE PartnerID = '"...
  2. G

    insert empty date string or date placeholder - vba

    yeah i kno i could use the AfterUpdate event. is there a way to get a date like 00/00/000. the end date is to be entered at a late date when the client decides to end his partner plan. the partner runs for 6 months so his maturity date is =dateAdd("m", 6, me.StartDate.Value). i just need a...
  3. G

    insert empty date string or date placeholder - vba

    TRN = Me.cboTrn.Value StartDate = Me.StartDate.Value EndDate = Me.EndDate.Value MaturityDate = Me.MaturityDate.Value PartnerId = Me.PartnerId.Value StartAmount = Me.StartAmount.Value ActualBalance = Me.ActualBalance.Value MaturitytBalance = Me.MaturityAmount.Value Installments =...
  4. G

    insert empty date string or date placeholder - vba

    hi guys, so im trying to use a date placeholder in access - vba but to no avail. ive tried finding help online via searches but nothing. ive already declared my date variable and now want to assign a place holder like 00/00/0000 to it.
  5. G

    how to refresh my form after insert query.

    Pat Hartman, thanks you need not be so savage. i had initially said that im new to access, i had also said in trying to learn this thing. thanks for your input re the First of all, it's Unbound not Unbounded. Cancel = True Exit Sub. thanks. arnelgp ... you're a life saver and a real BOSS...
  6. G

    how to refresh my form after insert query.

    i tired the whole bounded form thing and was getting errors, especially when i tried closing a form, it would write all the data back to the tables, corrupting my data. so i chose the unbounded method. unbounded works for me because i have some functionality that works great for me. i dont...
  7. G

    how to refresh my form after insert query.

    Yes i did. in my textbox i now have #Name?. usually onLoad, my PartnerId usually loads, now nothing
  8. G

    how to refresh my form after insert query.

    sorry for being such a pain. so ive done what u said. how do i use that module now ? ive named it ModMaxPID. remember i have a textbox and ive previously set its default value to my function.
  9. G

    how to refresh my form after insert query.

    nope, didnt work bruh. i copied ur code and replaced the contents of the module MaxPID, saved and retried
  10. G

    how to refresh my form after insert query.

    function: Public Function MaxPID() MaxPID = CurrentDb.OpenRecordset("qryMaxPatnerId").Fields(0) End Function query: SELECT Max([PartnerId]+1) AS NextID FROM PARTNER; so i moved my function to modules as you suggested and named my module MaxPID. on my form in my textbox's default value i have...
  11. G

    how to refresh my form after insert query.

    Here is a snippet of my code: TRN = Me.cboTrn.Value StartDate = Me.StartDate.Value EndDate = DateAdd("m", 6, Me.StartDate.Value) MaturityDate = Me.MaturityDate.Value PartnerId = Me.PartnerId.Value StartAmount = Me.StartAmount.Value ActualBalance = Me.ActualBalance.Value MaturitytBalance =...
  12. G

    how to refresh my form after insert query.

    ok so i tried. and i got this error: Run-time error '2424' the expression you entered has a function name that Microsoft Access cant find. and the debugger points to : Me.PartnerId = Eval(Replace(Me.PartnerId.DefaultValue, "=", ""))
  13. G

    how to refresh my form after insert query.

    on my form i need a new id. the new id is set in a textbox using =MaxPID() set in the textbox's Default Value. MaxPID() executes a query the last Id from my table + 1. i use this for my new id. After i execute my insert query on this form, how can i refresh my form and set my new id ( the...
  14. G

    duplicate output destination 'date'

    ok so thanks and ive resolved all my issues. if i come across any other issues i will consult again
  15. G

    duplicate output destination 'date'

    ok so i got the query working now. but with another issue. now im getting another error. Object Required. and it points to db.Close. and ideas ?
  16. G

    duplicate output destination 'date'

    sorry for being such a nub. i was waiting to ask that. does it work in vba like it does in most other languages where numbers are in single quotes and strings in double quotes ? can u provide examples of queries in vba please ? im tryna learn vba the hard way
  17. G

    duplicate output destination 'date'

    ok thanks. now to my other questions. how do i remedy this because i was of the impression that [date] was a typecast. do i just specify the variable names ?
  18. G

    duplicate output destination 'date'

    Hey i keep getting this error and i cant seem to understand why. here is my code and query Run-time Error '3063' duplicate output destination 'date' Private Sub Create_Click() Dim StrSQL As String Dim StrSQL2 As String Dim TRN As String Dim StartDate As Date Dim MaturityDate As Date Dim...
  19. G

    Code keeps deleting itself after error

    lol lol lmao. sry i shouldnt even be laughing. i tried the compact & repair option in access and now i cant do anything in my file. :( i had previous versions of my database stored so im gonna restart my forms. if i get this error again then ill be back. thanks a million guys. MarkK & arnelgp...
  20. G

    Code keeps deleting itself after error

    yes. all my tables have values
Back
Top Bottom