Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2023
    Posts
    1

    Question Help in coding

    hi everyone,


    i have a table called "Margin" and in this table i have a field also called "Margin"

    In a form called "costing" I have an unbound txt field called "txtMargin"

    in the same form i have two combo boxes, called ProductCategory and ProductCompanyName

    what i would like to to is the below:

    I want to enter a price in the txtMargin which will update the field "Margin" in the table "Margin" based on the value i choose from the combo ProductCat. The purpose is to run a query and see costing relults for single products which belong to the same product category.


    Any help is highly apreciated.

    Thanks in advance,
    Manolis

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in the form, bind the form to the table tMargin,
    bind the txtMargin box to field Margin.

    youll have a comobox to ProductCat, when user picks the item, set the txtMargin
    Code:
    sub cboBox_afterupdate()
      txtMargin = cboBox
    end sub

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Otherwise use an Update query with the combo value as criteria.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need Coding help
    By DMol15 in forum Programming
    Replies: 13
    Last Post: 06-03-2022, 11:22 AM
  2. pls hlp me fix this bad coding
    By harrie in forum Programming
    Replies: 1
    Last Post: 12-07-2016, 11:23 AM
  3. VBA IF NOT Coding
    By Grant Shea in forum Access
    Replies: 4
    Last Post: 09-12-2016, 02:41 PM
  4. Vb Coding Help
    By GarageConcepts in forum Access
    Replies: 1
    Last Post: 03-10-2016, 05:05 PM
  5. Coding within ADO
    By crowegreg in forum Programming
    Replies: 4
    Last Post: 08-20-2013, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums