Search results

  1. G

    help with a query in vba

    i have this form and need to write a query that will get Product name, category, price, quantity in stock from the products table ... Select productname, category, price, quantityinstock from Products where Productid = pid.value im new to written queries ... and this is as far as ive gotten...
  2. G

    Impossible query

    RELATIONSHIPS ACTIVITIES TABLE In the Activities table, Ledby is a teacher,Assistedby is also a teacher. President, VicePresident, Secretary, PRO & Treasurer are all students. How can i create a query to show all participants in an Activity, be they teachers or students ? i wanna show first...
  3. G

    Check if a field is empty

    quantity = me.amount.value keeps giving me an errow when amount is empty. is there a way to check if the field is empty and return 0 instead ?
  4. G

    Using DateDiff and getting errors

    as you can see, the rental date and return date(wich is the expected return date), now when i try to calculate the amount of months that have expried between today, and the expected return date using DateDiff ... retdate = Me.edate.Value aretdate = Date late = DateDiff("m", retdate, aretdate...
  5. G

    How to use a multi value result set

    Private Sub cborentals_AfterUpdate() Dim who As String Me.cbostudent.Value = cborentals.Column(1) Me.Fname.Value = cborentals.Column(5) Me.Lname.Value = cborentals.Column(6) Me.sgrade.Value = cborentals.Column(7) Me.CLASS.Value = cborentals.Column(8) Me.cbobookid.Value = cborentals.Column(2)...
  6. G

    Compile Error: User Defined type not defined

    im helping a friend with a project, he copied my login screen, users table and password query. it works fine on my pc, and fine on 3 other mates' computers but for this fourth friend, he is getting errors. i think ive tried all the suggestions found in forums: but to no avail, including making...
  7. G

    Assign a value from select to a variable

    so i have a simple select query which selects one value from a table. how do i then pass the one value to a variable ? the query in question is highlighted.
  8. G

    Solved Refresh Subform

    can i refresh a subform from OnChange of combobox ? if so, how can i achieve that ? please and thanks
  9. G

    Solved help needed with update query

    DoCmd.RunSQL "UPDATE CUSTOMERS SET Firstname = '" & Me.fname.Value & "', Lastname = '" & Me.lname.Value & "', PostalAddress = '" & Me.paddress.Value & "', City/District = '" & Me.city.Value & "', ContactNumber = " & Me.contact.Value & ", RegistrationDate = #" & Me.datej.Value & "#, Gender = '" &...
  10. G

    Option Button Help

    i have an option button, which onClick will enable some textfields. is it possible to disable the previously enabled items when the option button is clicked again(unchecked) ?? and if so, how do i do this ? please and thanks
  11. G

    Solved Mod Modification

    Public Function MaxCID() As Long MaxCID = Nz(DMax("CustomerID", "CUSTOMERDETAILS"), 0) + 1 End Function this mod returns the next available integer CustomerID is there a way to modify this existing mod to SPLIT & INCREMENT a STRING Id, P100, to return P101 ??
  12. G

    Solved Table key violation error

    this is my query: DoCmd.RunSQL "INSERT INTO CUSTOMERDETAILS (CUSTOMERID, CUSTOMERNAME, CUSTOMERADDRESS, CONTACT, EMAIL, ORGANIZATIONTYPE, ORGANIZATIONID,STATUS) VALUES (" & Me.CUSTOMERID.Value & ", '" & Me.cusname.Value & "', '" & Me.cusaddress.Value & "', '" & Me.CONTACT.Value & "', '" &...
  13. G

    get query criteria from a form field

    i have a query that will return all records for a customerId, however i want to link this query to a form so that the correct customerId will be passed to the query to be used as criteria. in the Criteria field, i put [Forms]![AddNewRental]![Combo19] but it works only sometimes andit keeps...
  14. G

    how do i check if a form is open ?

    i have a report that is called from one of two forms, this causes the criteria prompts from the unopened form to be displayed . i need to check which form is open and set parameters to solve my issue. how do i check/determine which form is open ??
  15. G

    disabling criteria prompts

    i have a report that can be called from 2 forms. it requires two values from each form. it worked perfectly previously. now whenever i try to call a report, it the querry for the report is prompting for all the criteria values specified in the query. Previously, its just get the values from...
  16. G

    select query

    hi. this query is giving me issues. i created it in Access query design n then copied it over to vba. does not work n i cant seem to figure out why. plz help strSql = "SELECT DRAWS.PartnerId, Sum(DRAWS.DrawAmount) AS SumOfDrawAmount FROM DRAWS GROUP BY DRAWS.PartnerId HAVING...
  17. G

    change textbox background color onchange of cbo

    Dim lngRed As Long, lngYellow As Long, lngWhite As Long lngRed = RGB(255, 0, 0) lngBlack = RGB(0, 0, 0) lngYellow = RGB(255, 255, 0) lngWhite = RGB(255, 255, 255) If Me.cboPartnerId.Column(16) = "" Or IsNull(Me.cboPartnerId.Column(16)) Then Me.earlybtn.Enabled = True Else...
  18. G

    disable form element if datefield is null

    Dim draw As Date If IsNull(draw = Me.cboPartnerId.Column(16)) Then Me.earlybtn.Enabled = True Else Me.earlybtn.Enabled = False End If i have null date fields in my database because i opted to not write anything to them in my insert statements. now i want to check to see if these...
  19. G

    stop selection of past days on datepicker

    is there a way to stop my user from selecting past/previous days on a date picker ?
  20. G

    blank date to date field in table

    how can i specify a blank date for a field in my table. the field in my table is a date field. it is called end date and its supposed to be blank or null till i decide to update it. any suggestions ??
Top Bottom