Search results

  1. M

    edit a join table

    First of all, thank you for replying. My main form contains unbound objects. One such object is a textbox that contains a IDClient. There's no parent/child relationship because this is the situation: articles [1-*] prices (based on the existence of different lists/catalogs) prices [*-1] list...
  2. M

    edit a join table

    I'm not sure how to go about it, so I thought to ask for help. I have a form that inherits a IDClient. The form has a subform with a recordsource made of two tables joint together (Articles left join Sales). Every client can have some 'sales %', always not more than one for each article. Now...
  3. M

    autofill

    Hi, I absolutely need your help. I put down a function. The function seems to work as intended. What I can't do is to extend the function to entire column. Help! [Public Function ADI() As Variant Dim cv, N, Tot As Integer Dim sourcerange, fillrange As Range Dim lastrow As Integer cv = 0 N =...
  4. M

    Validation rule

    what was suggested was something of the sort: sub txtItemID_BeforeUpdate(Cancel as Integer) If DCount("fieldname1", "table/query", "fieldname2 =" & Me.txtItemID.value) = 0 then msgbox("Insert valid id") cancel = true else cancel = false end if end sub Also you could use something of the sort...
  5. M

    edit recordset

    Thanks again! Well, today I learned sth. new. :)) I'll keep it in mind for next time
  6. M

    edit recordset

    Thanks!!! It worked! I am using a bound (sub)form (that runs a SQL recordsource with some variables), it's just that I need to edit/insert some info in fields that don't have corrisponding bound controls. So I thought of accessing those field directly through a recordset. Was I wrong? Also...
  7. M

    edit recordset

    Ok, so I seem to always make stupid mistakes, and I imagine this not to be a different case. However posting speeds up the process of finding the misspell. So, at the cost of annoying you, I'll risk my hide. Hope you take pity in me and try to give me a hand :rolleyes: I need to update/edit the...
  8. M

    append query fails due to referential integrity

    Thanks for your interest! I found the problem. I was copying MaterialeID instead of IDDettLavorazione in the MaterialiConformità.DettLavorazioneID field. So the script of the SQL string read correctly the variables involved, however I didn't noteced that I put the wrong field name in the...
  9. M

    append query fails due to referential integrity

    Here it is. Perhaps a solution could be to drop the referential integrity beforehand and later restore it. However, this doesn't really delve into the problem. So, I'm not sure if by using such sort of patch (which, by the way, I don't have the ablity to write down), I may incur later in...
  10. M

    append query fails due to referential integrity

    Hi, I need your advice because I don't know how to bypass the problem. I have two tables : (1) Dett_Lav , (2) MaterialiConformità. They are thus linked: (1) IDDett_Lav <---one - to- many ---> (2) Dett_LavID I'd like to preserve the referential integrity. In vba I wrote down this codethat...
  11. M

    Referential Integrity Relationships - in vba

    Just to experiment the code, I went to the relationship pane in the same database where the function posted above was saved and deleted an existing relationship with referential integrity (So the table is definitely added to the pane. However, even if it wasn't added, I believe when 'Show all...
  12. M

    Referential Integrity Relationships - in vba

    thanks. I'll look into it :)
  13. M

    Referential Integrity Relationships - in vba

    That's the problem. The relationship doesn't show up in the relationship pane. I click 'Show All Relationships' and still nothing is visible. I'm not sure if it's normal or the relationship for some reason wasn't created. So I'm looking for information about relationships created through code...
  14. M

    Referential Integrity Relationships - in vba

    There are two almost identical databases. On one we make experiments (let's call it AA), on the other data is inserted (BB). When the experiments are successful, the data tables (BB) are transfered into this database (AA) in order to have new functions. A copy is made and on this copy data...
  15. M

    Referential Integrity Relationships - in vba

    That much I had already gatered. Thanks for answering. I will try to read more on relationship objects on the net and be more prepared next time.
  16. M

    Referential Integrity Relationships - in vba

    Hi! Hope you're not still fed up with me :p. I'd like to appeal to your knowledge. I'm thinking about creating temporary (while db open) relationships between tables, since transfering tables is possible only if no linked relationships are present. However it's important to preserve in some...
  17. M

    SQL null dates

    I discovered the problem! I had to write <= instead of =< . Now it works. Pbaldy, you were right. Null values wasn't the issue at all. Thanks! :D
  18. M

    SQL null dates

    ps. the messiness of the code is due to my inexperience wih vba and partly to the feedback system of choice - a simple msgbox(StrSQL). :D I tried to delete the paranthesis around the field name. (Unfortunately) the result doesn't change. In my post #5 I wrote the problematic line. I wrote down...
  19. M

    SQL null dates

    I regularly add spaces at the end of the string (in case of variables, at the beginning) and the parenthesis are counted (since that's the first mistake I made. Now I pay attention :cool:). it's WHERE ( ..etc..."AND ( (1) OR (2) ) " ...etc...)
Top Bottom