problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

problem

hi,

my problem is:
i have a field custID in Orders table, which must be in Customers table.
what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.

thnk you all
amra.

p.s. the connection to recordset in Customers table is ok.
i think the main problem is where do i put my select? is there any event like After update field... or something......

Comments

  • FlakesFlakes Posts: 642Member
    : hi,
    :
    : my problem is:
    : i have a field custID in Orders table, which must be in Customers table.
    : what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.
    :
    : thnk you all
    : amra.
    :
    : p.s. the connection to recordset in Customers table is ok.
    : i think the main problem is where do i put my select? is there any event like After update field... or something......
    :


    Didnt really get what you want,you also want to find customer name corresponsding to the custid??

    Can you explain a bit more?


  • amraamra Posts: 18Member
    : : hi,
    : :
    : : my problem is:
    : : i have a field custID in Orders table, which must be in Customers table.
    : : what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.
    : :
    : : thnk you all
    : : amra.
    : :
    : : p.s. the connection to recordset in Customers table is ok.
    : : i think the main problem is where do i put my select? is there any event like After update field... or something......
    : :
    :
    :
    : Didnt really get what you want,you also want to find customer name corresponsding to the custid??
    :
    : Can you explain a bit more?
    :
    you are right. i want to find customer name corresponsding to the custid. it is a simple select statemant, but i cannot find the right place for it.
    i think i have two problems: the first is that i have to do select before i actialy get to the database open, the second is that i can not assign any values after filling specific field, and before submit button.
    i fond something in VBScript like, AfterUpdateField, WillChangeField... but it does not work, or i dont use it as i should


  • FlakesFlakes Posts: 642Member
    : : : hi,
    : : :
    : : : my problem is:
    : : : i have a field custID in Orders table, which must be in Customers table.
    : : : what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.
    : : :
    : : : thnk you all
    : : : amra.
    : : :
    : : : p.s. the connection to recordset in Customers table is ok.
    : : : i think the main problem is where do i put my select? is there any event like After update field... or something......
    : : :
    : :
    : :
    : : Didnt really get what you want,you also want to find customer name corresponsding to the custid??
    : :
    : : Can you explain a bit more?
    : :
    : you are right. i want to find customer name corresponsding to the custid. it is a simple select statemant, but i cannot find the right place for it.
    : i think i have two problems: the first is that i have to do select before i actialy get to the database open,
    [red]you cannot do a select without a database connection[/red]
    the second is that i can not assign any values after filling specific field, and before submit button.
    : i fond something in VBScript like, AfterUpdateField, WillChangeField... but it does not work, or i dont use it as i should
    :

    [red]If you post some code maybe we will have a try at it..[/red]

  • amraamra Posts: 18Member
    : : : : hi,
    : : : :
    : : : : my problem is:
    : : : : i have a field custID in Orders table, which must be in Customers table.
    : : : : what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.
    : : : :
    : : : : thnk you all
    : : : : amra.
    : : : :
    : : : : p.s. the connection to recordset in Customers table is ok.
    : : : : i think the main problem is where do i put my select? is there any event like After update field... or something......
    : : : :
    : : :
    : : :
    : : : Didnt really get what you want,you also want to find customer name corresponsding to the custid??
    : : :
    : : : Can you explain a bit more?
    : : :
    : : you are right. i want to find customer name corresponsding to the custid. it is a simple select statemant, but i cannot find the right place for it.
    : : i think i have two problems: the first is that i have to do select before i actialy get to the database open,
    : [red]you cannot do a select without a database connection[/red]
    : the second is that i can not assign any values after filling specific field, and before submit button.
    : : i fond something in VBScript like, AfterUpdateField, WillChangeField... but it does not work, or i dont use it as i should
    : :
    :
    : [red]If you post some code maybe we will have a try at it..[/red]
    :
    :
    i think that connection is ok, it actually works ok, because i get the value i need in session variable... here is the code i wrote

    dim ud_MySQL
    dim ud_oRSTemp
    set ud_oRSTemp=Server.CreateObject("ADODB.Recordset")
    ud_MySQL="SELECT dbo.AARTIKLI.NAZIV FROM dbo.AARTIKLI WHERE dbo.AARTIKLI.ARTIKAL =" & CSTR(oRSNARSTAVKE.Fields("ARTIKAL").Value)

    ud_oRSTem.Open ud_MSQL, objCN, adOpenStatic, adLockReadOnly, adCmdUnspecified



    ud_art= ud_oRSTem.Fields("NAZIV").Value

    ud_oRSTem.Close
    SET ud_oRSTem=NOTHING


    this code works ok, i get value i need but after submit button.
    is there any va to track focus, and mybe put this code after field has lost focus? i have no idea...
    points where i can actally put this code in tool i have to use are:
    Before and after merge call, and on processor side: before open, after open, before and after update, and before and after close.
  • FlakesFlakes Posts: 642Member
    : : : : : hi,
    : : : : :
    : : : : : my problem is:
    : : : : : i have a field custID in Orders table, which must be in Customers table.
    : : : : : what i wont is: when i fill the cusID field-pass the correct cusName, after i move to another field on the Orders form.
    : : : : :
    : : : : : thnk you all
    : : : : : amra.
    : : : : :
    : : : : : p.s. the connection to recordset in Customers table is ok.
    : : : : : i think the main problem is where do i put my select? is there any event like After update field... or something......
    : : : : :
    : : : :
    : : : :
    : : : : Didnt really get what you want,you also want to find customer name corresponsding to the custid??
    : : : :
    : : : : Can you explain a bit more?
    : : : :
    : : : you are right. i want to find customer name corresponsding to the custid. it is a simple select statemant, but i cannot find the right place for it.
    : : : i think i have two problems: the first is that i have to do select before i actialy get to the database open,
    : : [red]you cannot do a select without a database connection[/red]
    : : the second is that i can not assign any values after filling specific field, and before submit button.
    : : : i fond something in VBScript like, AfterUpdateField, WillChangeField... but it does not work, or i dont use it as i should
    : : :
    : :
    : : [red]If you post some code maybe we will have a try at it..[/red]
    : :
    : :
    : i think that connection is ok, it actually works ok, because i get the value i need in session variable... here is the code i wrote
    :
    : dim ud_MySQL
    : dim ud_oRSTemp
    : set ud_oRSTemp=Server.CreateObject("ADODB.Recordset")
    : ud_MySQL="SELECT dbo.AARTIKLI.NAZIV FROM dbo.AARTIKLI WHERE dbo.AARTIKLI.ARTIKAL =" & CSTR(oRSNARSTAVKE.Fields("ARTIKAL").Value)
    :
    : ud_oRSTem.Open ud_MSQL, objCN, adOpenStatic, adLockReadOnly, adCmdUnspecified
    :
    :
    :
    : ud_art= ud_oRSTem.Fields("NAZIV").Value
    :
    : ud_oRSTem.Close
    : SET ud_oRSTem=NOTHING
    :
    :
    : this code works ok, i get value i need but after submit button.
    [red]In ASP, you will only get the value after a submit,because it requires a server action for stuff like DB Access.[/red]
    : is there any va to track focus, and mybe put this code after field has lost focus?
    [red]
    Losing focus is a client side action.You could force a submit using javascript,like
    [code]

    [/code]

    But thats still a submit...
    [/red]
    i have no idea...
    : points where i can actally put this code in tool i have to use are:
    : Before and after merge call, and on processor side: before open, after open, before and after update, and before and after close.
    :

Sign In or Register to comment.