|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Extracting empty text fields
Hi,
I somehow solved the problem of retrieving the last record (field by field) and inserting the data in the new one. In doing I have a problem when the field copied is empty. Here is the code I'm using: m_instruction = "Select [Master database].Polarization AS Tmp FROM [Master database] WHERE [Master database].ID = " & ID_n 'here ID_n is the last record ID sql = m_instruction rs.Open sql, CurrentProject.Connection Extract = rs![tmp] [Polarization].SetFocus [Polarization].Text = Extract rs.Close If rs![tmp] is empty the code crashes... Does anyone have a fast suggestion for taking and writing empty fields? Thanks for your time! bye, Helder PS: sorry, but I'm really starting with this Access/VB things... argh... too many things ! |
|
#2
|
||||
|
||||
|
Sorry sorry....
I solved inserting: If IsNull(rs![tmp]) Then Extract = "" Else Extract = rs![tmp] End If instead of just Extract = rs![tmp] Thanks anyway! Bye! helder |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Extracting empty text fields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|