Hi guys,
I have one main form: ma_search2 which is unbound. Which has an unbound textbox: EnterPostcode, which is for user entry. When the user enters a post code (string), i want it to filter a table called: ma_dbo_uk, with field: POSTCODE. Now i have a command button which opens up a 2nd form: prmf(unbound), which has one textbox: txt_prmf which i hope to display a field: PRMF (also unbound) from same table, with the record entered by the user in textbox: EnterPostcode in the first form.
This is what i have so far on the on open property of the 2nd form:
The code does not give any errors but does not display anything in textbox, does not display field prmf, from record filtered by textbox: EnterPostcode.
Any help appreciated, thanks in advance,
M-.
I have one main form: ma_search2 which is unbound. Which has an unbound textbox: EnterPostcode, which is for user entry. When the user enters a post code (string), i want it to filter a table called: ma_dbo_uk, with field: POSTCODE. Now i have a command button which opens up a 2nd form: prmf(unbound), which has one textbox: txt_prmf which i hope to display a field: PRMF (also unbound) from same table, with the record entered by the user in textbox: EnterPostcode in the first form.
This is what i have so far on the on open property of the 2nd form:
Code:
If IsNull(Forms![ma_search2]![EnterPostcode]) Then
MsgBox "You did not enter anything in the first text box"
Exit Sub
Else
Me.txt_prmf = DLookup("dbo_UK_homes.PRMF", "dbo_UK_homes", "dbo_UK_homes.POSTCODE='" & Forms![ma_search2]![EnterPostcode] = "'")
End If
The code does not give any errors but does not display anything in textbox, does not display field prmf, from record filtered by textbox: EnterPostcode.
Any help appreciated, thanks in advance,
M-.