Search results

  1. S

    Do While ... Loop help

    i'm a beginner to access vba. so i was trying to make things work with my limited knowledge. i am indeed trying to insert a foreign key into the table. there are 2 tables in question, tblXT and tblXtInc. tblXt pkXtID productname strXtStatus tblXtInc pkXtInxID fkXtID payment date voucher...
  2. S

    Do While ... Loop help

    [Solved] Do While ... Loop help hi all, i'm trying to add payment records when my clients' status is pending payment. i came up with this code, but it is giving me an error at this line(highlighted in red), saying that i can't go to the specific record. i have just realised that this happens...
  3. S

    check if record was modified using me.dirty

    thanks for the advice and tips. :)
  4. S

    check if record was modified using me.dirty

    i've achieved what i needed in another way, by checking the value right after it has been modified. no issues have popped up for me as of now. thanks for the information. i've learned something new today. :) here's the code: Private Sub Command11_Click() 'when closing [FormName2], msgbox...
  5. S

    check if record was modified using me.dirty

    ok, so i've tried changing the code to use the oldvalue property. but it's still not working. i'm not sure where it has gone wrong. Private Sub lngKci_GotFocus() If Me.lngKci.Value > Me.lngKci.OldValue Then If Me.exprTotal = 0 Then GoTo exit_sub Else If Me.exprTotal Mod 3 = 0 Then MsgBox...
  6. S

    check if record was modified using me.dirty

    yes, my computed field is from a query. it is not stored in any tables. if that's the case, can i use one of the fields from the formula to check? example: [exprTotal]: [x] + [y] so can i use [x] with the me.dirty? however, i am updating my [x] with another vba code. so i believe i should...
  7. S

    check if record was modified using me.dirty

    hi all, i'm trying to write a code that checks if the field was modified before popping up a message box. however, i think that the me.dirty is not working here. is it because my [exprTotal] is a calculated field? if it is so, how can i check if the field is modified without me.dirty? code...
  8. S

    code not working

    oh! it worked! thanks a lot!!
  9. S

    code not working

    my avg is a number, so if the avg is between 0 to 3.9, the flow type should be light. it is the same for the rest.
  10. S

    code not working

    hi all, i've a code that returns the flow type based on their average results. my code is this: "qryavgload2" is a query i created, which selects the ID and average. no error came up, but the results are "heavy" for most of the records, even if it should be "moderate" or "light". only...
  11. S

    Concatenate help needed.

    hi all, i have created query that look like this: example: Name| Date| Project| date-project 1| 10 apr| eggs |10 apr - eggs 1| 10 apr| bread |10 apr - bread 1| 11 apr| chicken |11 apr - chicken how can i make it into like this? example: Name| Date| Project| date-project 1| 10 apr|...
  12. S

    Designing forms - what is important?

    yes, you're definitely right about that. it's so frustrating at times when we can't understand each other. i'll be like "What's wrong with you? Why can't you understand me?". and all the while it's just sitting there smirking at me, thinking "Well, i don't understand you. You can either speak my...
  13. S

    Designing forms - what is important?

    ah. it's much clearer to me now. thanks for explaining it. right now i feel that learning access is like learning a new language. you have to speak its language before you can tell access to make things happen for you.
  14. S

    Designing forms - what is important?

    ok. let me see if i understand it. the control name in Me.controlname is a control on the pop up form right? so it will be something like: DoCmd.OpenForm "formname", , , , , , Me.fkCusID and in the beforeInsert procedure of the pop up form: me.fkCusID=me.OpenArgs but what does me.OpenArgs...
  15. S

    Designing forms - what is important?

    thanks all for the great input. i guess it's true when they say that the uses of access is only limited to your imagination. (i believe i read it somewhere, or it might be my imagination too.) the progress with my database has stalled these few days. i would be staring at the database, and...
  16. S

    Designing forms - what is important?

    the search form in the link looks really complicated. i will have to study it in more detail at home later. about using tabbed controls. what if i have a subform in my subform again? also, it seems to me that navigating the sub-subforms is difficult. if i show the navigation buttons for my...
  17. S

    Designing forms - what is important?

    Hi all, I'm working on creating a database, and i've already set up the tables and relations. Right now, i'm stuck on the forms. My idea of forms is just forms with subforms, so you can update all the related data in the same form. But now that i'm designing the forms, i find that my forms...
  18. S

    prevent users from adding new record when there is one already.

    ok. i have tried the code, but i'm still getting an error in my dlookup. my code is: 'declare variable Dim x As String x = DLookup("strStatus", tblTest, "pkCusID = " & fkCusID) i have tried switch the fkCusID and pkCusID around, but it's telling me i gave an invalid argument.
  19. S

    prevent users from adding new record when there is one already.

    I'm currently at the library posting with my iPod. Though I haven't tried out the code, but I have an idea how it works now. Apparently, I was using the dlookup the wrong way. But I was sitting here thinking for a while, and I thought that these 2 tables should be in a one to one relationship...
  20. S

    prevent users from adding new record when there is one already.

    it works, but not in the way i want it to. can i put this as an onclick event in a command button? for example: If (Customer already has a Test status) Then cmdbutton.enabled=false Else cmdbuttom.enabled=true is this possible?
Back
Top Bottom